diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-02-04 03:13:51 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-02-05 17:02:15 +0300 |
commit | 86193d25dbe5470a465dd91655c6aeaabab19b21 (patch) | |
tree | 9be350eeb300a08be68c1cdcaf59ea48f5724dcb /source/blender/draw/modes/shaders/edit_curve_overlay_loosevert_vert.glsl | |
parent | f3f2602c88d866db6052ed03bbec1c9da4183e57 (diff) |
Edit Mesh: Refactor Edit cage drawing to use old style drawing
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.
Diffstat (limited to 'source/blender/draw/modes/shaders/edit_curve_overlay_loosevert_vert.glsl')
-rw-r--r-- | source/blender/draw/modes/shaders/edit_curve_overlay_loosevert_vert.glsl | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/source/blender/draw/modes/shaders/edit_curve_overlay_loosevert_vert.glsl b/source/blender/draw/modes/shaders/edit_curve_overlay_loosevert_vert.glsl index 85e38ba3b43..eb0de41a320 100644 --- a/source/blender/draw/modes/shaders/edit_curve_overlay_loosevert_vert.glsl +++ b/source/blender/draw/modes/shaders/edit_curve_overlay_loosevert_vert.glsl @@ -9,13 +9,10 @@ in int data; out vec4 finalColor; -#define VERTEX_ACTIVE (1 << 0) -#define VERTEX_SELECTED (1 << 1) - void main() { - if ((data & VERTEX_SELECTED) != 0) { - if ((data & VERTEX_ACTIVE) != 0) { + if ((data & VERT_SELECTED) != 0) { + if ((data & VERT_ACTIVE) != 0) { finalColor = colorEditMeshActive; } else { |