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
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2019-02-04 03:13:51 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-02-05 17:02:15 +0300
commit86193d25dbe5470a465dd91655c6aeaabab19b21 (patch)
tree9be350eeb300a08be68c1cdcaf59ea48f5724dcb /source/blender/gpu/shaders/gpu_shader_2D_edituvs_facedots_vert.glsl
parentf3f2602c88d866db6052ed03bbec1c9da4183e57 (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/gpu/shaders/gpu_shader_2D_edituvs_facedots_vert.glsl')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_2D_edituvs_facedots_vert.glsl6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_2D_edituvs_facedots_vert.glsl b/source/blender/gpu/shaders/gpu_shader_2D_edituvs_facedots_vert.glsl
index c5f84b976c5..e0d168e8095 100644
--- a/source/blender/gpu/shaders/gpu_shader_2D_edituvs_facedots_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_2D_edituvs_facedots_vert.glsl
@@ -8,10 +8,12 @@ in int flag;
out vec4 finalColor;
-#define FACE_SELECT (1 << 2)
+/* TODO: Port drawing to draw manager and
+ * remove constants duplications. */
+#define FACE_UV_SELECT (1 << 7)
void main()
{
gl_Position = ModelViewProjectionMatrix * vec4(pos, 0.0, 1.0);
- finalColor = ((flag & FACE_SELECT) != 0) ? selectColor : vertColor;
+ finalColor = ((flag & FACE_UV_SELECT) != 0) ? selectColor : vertColor;
}