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:
authorCampbell Barton <ideasman42@gmail.com>2019-01-22 14:20:19 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-01-22 14:22:20 +0300
commit585e4848e145e5345d08bc7c97d8a7ae34bc2bb0 (patch)
treecb5e7373f73437ccc36ddb6c0b27eeb9e69ae106 /source/blender/draw/modes/shaders/paint_vertex_vert.glsl
parent9c61107ba53b6b6728a7e1282503f5e4ee9781cd (diff)
3D View: Support vert & weight paint mask clipping
Diffstat (limited to 'source/blender/draw/modes/shaders/paint_vertex_vert.glsl')
-rw-r--r--source/blender/draw/modes/shaders/paint_vertex_vert.glsl5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/draw/modes/shaders/paint_vertex_vert.glsl b/source/blender/draw/modes/shaders/paint_vertex_vert.glsl
index e52c17e52d5..7d2a20ad427 100644
--- a/source/blender/draw/modes/shaders/paint_vertex_vert.glsl
+++ b/source/blender/draw/modes/shaders/paint_vertex_vert.glsl
@@ -1,5 +1,6 @@
uniform mat4 ModelViewProjectionMatrix;
+uniform mat4 ModelMatrix;
in vec3 pos;
in vec3 c; /* active color */
@@ -18,4 +19,8 @@ void main()
gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0);
finalColor = srgb_to_linear_attrib(c);
+
+#ifdef USE_WORLD_CLIP_PLANES
+ world_clip_planes_calc_clip_distance((ModelMatrix * vec4(pos, 1.0)).xyz);
+#endif
}