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-02-06 15:19:39 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-02-06 15:25:31 +0300
commit3e6ebdd2a6b5b7563e9c45dae3c65ebf7d629544 (patch)
tree3f95c565df2a16c687d7391a94703d1c0ff08d2e /source/blender/draw/modes/shaders/edit_curve_overlay_handle_geom.glsl
parentfea5e1dc3a235303789e2a7bac2005c0667f1963 (diff)
DRW: Support edit-curve clipping
Diffstat (limited to 'source/blender/draw/modes/shaders/edit_curve_overlay_handle_geom.glsl')
-rw-r--r--source/blender/draw/modes/shaders/edit_curve_overlay_handle_geom.glsl6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/draw/modes/shaders/edit_curve_overlay_handle_geom.glsl b/source/blender/draw/modes/shaders/edit_curve_overlay_handle_geom.glsl
index 9000fd7247b..c2ab0ecfd40 100644
--- a/source/blender/draw/modes/shaders/edit_curve_overlay_handle_geom.glsl
+++ b/source/blender/draw/modes/shaders/edit_curve_overlay_handle_geom.glsl
@@ -19,10 +19,16 @@ void output_line(vec2 offset, vec4 color)
gl_Position = gl_in[0].gl_Position;
gl_Position.xy += offset * gl_in[0].gl_Position.w;
+#ifdef USE_WORLD_CLIP_PLANES
+ world_clip_planes_set_clip_distance(gl_in[0].gl_ClipDistance);
+#endif
EmitVertex();
gl_Position = gl_in[1].gl_Position;
gl_Position.xy += offset * gl_in[1].gl_Position.w;
+#ifdef USE_WORLD_CLIP_PLANES
+ world_clip_planes_set_clip_distance(gl_in[1].gl_ClipDistance);
+#endif
EmitVertex();
}