Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-02-10Cleanup: use shorter name for shader configCampbell Barton
The struct name is descriptive, this isn't going to be confused with other variables.
2019-02-07Edit Mode: Draw Vertices after edgesClément Foucault
This avoid edges covering a part of vertices. This comes at a (very minor) perf cost as vertices can cover some edges pixels and early discard them with the depth test. But this only happens in artificialy dense mesh and is not a real problem for common cases.
2019-02-07Edit Mode: Reduce number of edges drawnClément Foucault
This make sure only one line is drawn per edge. It makes the function mesh_create_edit_loops_points_lines() non-thread safe but this is fine as of now because nothing is multithreaded at this point. Also this is the only function use this flag so it might be OK. The side effect is that we don't need to use depth test in edit mode overlay so the masking artifact will not appear.
2019-02-07Edit Mesh: Rework new implementation and use geometry shader to draw linesClément Foucault
This make it (theoriticaly) compatible with all supported hardware with consistent results. Also we now draw the lines with analytic anti-aliasing instead of relying on MSAA (which offers less benefits in our case). The remaining aliasing comes from edges cut in half by the mesh which is not rendered with MSAA. Hopefully this is not too much distracting and only happen if the face is almost parallel to the view.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-06GPU: refactor clipped drawing from DRW into GPUCampbell Barton
Needed to fix T61196, supporting clipped back-buffer in the 3D view which is done outside the draw module. It was also inconvenient having DRW_shader_* versions of GPU_shader_* API calls. - Clipping distances are now supported as a shader configuration for builtin shaders. - Add shader config argument when accessing builtin shaders. - Move GPU_shader_create_from_arrays() from DRW to GPU.
2019-02-05Edit Mode: Increase depth Bias for verticesClément Foucault
2019-02-05Edit Mode: Fix Xray edit mode broken due to recent refactorClément Foucault
2019-02-05Edit Mesh: Add workaround for system that does not support wide linesClément Foucault
This adds a new geometry shader (specific to edit mesh for now) that reproduces the effect of glLineWidth > 1.0, since this is not supported on all platform. This fix could be generalized to other shaders later.
2019-02-05Edit Mesh: Fix some problem with new implementationClément Foucault
- Add manual depth offset to vertices and edges. - Revert to plain edge decoration. - Fix active edge coloring. - Remove active face display if not in face selection mode. - Add wide line support.
2019-02-05Edit Mesh: Remove old unused code and filesClément Foucault
Cleanup after recent refactor.
2019-02-05Edit Mesh: Refactor Edit cage drawing to use old style drawingClément Foucault
This is work in progress. Look is not final. This align data VBO data structure used for edti cage drawing to the one use for normal drawing. We no longer use barycentric coords to draw the lines an just rasterize line primitives for edge drawing. This is a bit slower than using the previous fast method but faster than the "correct" (edge artifact free) method. This also make the code way simpler. This also makes it possible to reuse possible and normal vbos used for shading if the edit cage matches the This also touches the UV batch code to share as much render data as possible. The code also prepare for edit cage "modified" drawing cage (with modifier applied) but is not enabled since selection and operators does not work with modified cage yet.
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
BF-admins agree to remove header information that isn't useful, to reduce noise. - BEGIN/END license blocks Developers should add non license comments as separate comment blocks. No need for separator text. - Contributors This is often invalid, outdated or misleading especially when splitting files. It's more useful to git-blame to find out who has developed the code. See P901 for script to perform these edits.
2019-01-31Cleanup: add trailing commasCampbell Barton
Improve clang-format output.
2019-01-24DRW: use clipping for depth bufferCampbell Barton
Object selection now supports clipping.
2019-01-23Cleanup: comments above struct members, shader group assignmentsCampbell Barton
Avoid using pointer to pointer when building shader groups.
2019-01-23DRW: generalize selecting between regular/clipped shadersCampbell Barton
Each engine was doing this on its own. Move to DRWContextState, use an enum.
2019-01-23Cleanup: add BEGIN/END to GPL headersCampbell Barton
2019-01-22Cleanp: use single global for draw managerCampbell Barton
Add 'G_draw' for all draw manager globals, avoids adding extern to each file. Connection between `ts` and `globals_ubo` wasn't obvious, now called `G_draw.block` & `G_draw.block_ubo`.
2019-01-22Fix error in last commitCampbell Barton
2019-01-22Cleanup: use DRW_shader_create_from_arraysCampbell Barton
Avoids messy conditional defines and inline lib allocation.
2019-01-22Cleanup: rename shader containersCampbell Barton
These only contain shaders, so name Shaders instead of ShaderData.
2019-01-21Fix clipping shaders with some AMD/Intel driversCampbell Barton
Caused: error: unsized array index must be constant Use hard coded number of clipping planes, copying the 4th to 5 & 6 when only 4 are used.
2019-01-21DRW: Support wire overlay clippingCampbell Barton
2019-01-21Correct freeing builtin shader from recent commitCampbell Barton
2019-01-21Cleanup: remove '_sh' suffixCampbell Barton
Shaders are now stored in their own struct, no need for special names. Also free as an array.
2019-01-21DRW: Support edit-mesh clippingCampbell Barton
2018-12-18Mesh Batch Cache: Port weight paint surface to batch requestClément Foucault
2018-12-17Mesh Batch Cache: Optimization & Refactor shaded surface supportClément Foucault
This now only upload data per loops to the GPU, making use of index buffer to draw polygon. This make use of the vertex cache, speed up renders and saves a lot of vram. Update performance is also slightly faster and can even be improved further by updating only uvs or vcol independently. This commits breaks texture paint batches. It will be added back in another commit.
2018-12-11Edit Mesh: Make edit cage stick to the mesh when possibleClément Foucault
and correctly offset it when it's not possible, otherwise we get zfighting.
2018-12-10Edit Mesh: Make "fresnel effect" not transparent but mix between 2 colorsClément Foucault
Alpha blending is causing too many issues. Revert back to something simpler.
2018-12-10DRW: Batch Cache: Mesh: Port edit mesh batches to batch request methodClément Foucault
This also do some renaming/cleanups.
2018-12-07DRW: Remove the use of GPUTexture buffers for edit wire renderingClément Foucault
See previous commit for detail as why.
2018-12-07GPU: Remove EXT and add assertClément Foucault
Some drivers accept shaders with only vertex stage, but some just silently fails.
2018-11-26Viewport: implement hiding faces in paint modes.Alexander Gavrilov
In 2.79 hiding works in paint modes with selection enabled, so it is a missing feature. This implements it in texture paint overlays and in workbench base shading. Reviewers: fclem Differential Revision: https://developer.blender.org/D3989
2018-11-16Edit Mesh: Improve mesh cage drawing / fix errors and cleanupClément Foucault
* Fixes vertices with bad coloring. Now vertices draw with depth write so they occlude the underlying face geom overlay, avoiding double drawing the vertex. * Decrease the z_offset of edges so they don't poke too much through geometry. Also delete this offset in ortho view. * Add zoffset to active and selected vertices so they always draw on top if they overlap a non selected vertex. * Fix alpha of edge_fix in vertex selection mode
2018-11-05Edit Mesh: Fix wire opacity when not rotating the view in Xray modeClément Foucault
2018-10-15Edit Mesh: Fix missing loop normal displayClément Foucault
2018-10-12Edit Mesh: Refactor edit mesh drawingClément Foucault
This decouple the vertex display from the face+edges. This is to reduce the number of triangles required to fix the edges artifacts (aliasing) and increase viewport reactivity when not actively navigating (ie. mouse scroll). Also it makes all vertices visible (not cut-off) even when navigating. However it makes the navigation drawing a bit slower because it has to render twice. Also add a depth bias to the wires to avoid depth fighting when previewing final mesh (modifiers applied).
2018-10-02Fix weight drawing in Edit Mode by using the Weight Paint shader.Alexander Gavrilov
After rB3da46a8d8df2 the vertex color shader can't draw the raw weight data produced by DRW_cache_mesh_surface_weights_get.
2018-09-29Fix mixed drawing face and edge checks in draw managerDalai Felinto
2018-09-26Wireframe/Xray: Make Xray option local to wireframe modeClément Foucault
This commit make the Xray option for the wireframe different from the other shading mode. This makes it possible to rapidly switch between wireframe + Xray and Solid mode without Xray. Xray alpha is also decoupled. Both variables are duplicated and exposed separately through RNA.
2018-09-25Edit Mesh: Move Edit Mesh display settings to overlay'sClément Foucault
This makes the Edit Mesh display settings common to all objects. They can also be set differently per viewport. Modifying extra data (seams, sharp edges etc...) will no longer set them automaticaly visible. Bumping version because we need to force set all extra draw options for older files.
2018-09-25Implement correct drawing of advanced Weight display features.Alexander Gavrilov
This adds existing behavior from calc_weightpaint_vert_array that was missing from the new rendering code: - No selected Vertex Group displays as a solid pink color. - Zero weight displays as alert color depending on Options. - Multipaint mode correctly displays collective weight. In order to properly implement this variety, a data structure holding all relevant parameters is introduced. Reviewers: fclem, campbellbarton Subscribers: jbakker Differential Revision: https://developer.blender.org/D3722
2018-09-21Edit Mode: Merge Xray and "Limit selection to visible" options behaviourClément Foucault
We now treat Xray as being the mode where Limit selection to visible is off. If Xray is OFF, Limit selection to visible is considered ON. To allow 'see through wires' with solid shading (not Xray shading) we still draw solid shading if Xray is ON with Xray Alpha set to 1.0.
2018-09-06Cleanup: styleCampbell Barton
2018-09-05Edit Mesh: Add back the option to not highlight selected faces/edgesClément Foucault
Do note that we force showing the face dot if we are in face select mode but faces and edges overlays are disable to not loose the selected faces entirely.
2018-09-05Edit Mesh: Add support for draw option parametersClément Foucault
The visuals was already implemented but we could not toggle them off.
2018-08-303D View: option to always show center in face modeCampbell Barton
This matches 2.7x behavior
2018-08-303D View: use thicker edges when in edge-modeCampbell Barton
Without this there is no visual differentiation between face/edge mode.