diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-16 09:37:08 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-16 09:37:08 +0300 |
commit | 6aebb5a4d5f5c0866263b8507dbed460f60ba64f (patch) | |
tree | 51ecc4f934f93e571ff483926c4a028d463c819e /source/blender/gpu/shaders/gpu_shader_2D_line_dashed_geom.glsl | |
parent | dbfbd6b9043d325456225aaf4c8af7bba7cc4aa0 (diff) |
DRW: support clipping for relationship lines
Diffstat (limited to 'source/blender/gpu/shaders/gpu_shader_2D_line_dashed_geom.glsl')
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_2D_line_dashed_geom.glsl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_2D_line_dashed_geom.glsl b/source/blender/gpu/shaders/gpu_shader_2D_line_dashed_geom.glsl index 8fa19f94b39..1e5a75c37b8 100644 --- a/source/blender/gpu/shaders/gpu_shader_2D_line_dashed_geom.glsl +++ b/source/blender/gpu/shaders/gpu_shader_2D_line_dashed_geom.glsl @@ -30,6 +30,10 @@ void main() gl_Position = v1; color_geom = color_vert[0]; distance_along_line = 0.0f; + +#ifdef USE_WORLD_CLIP_PLANES + world_clip_planes_set_clip_distance(gl_in[0].gl_ClipDistance); +#endif EmitVertex(); gl_Position = v2; @@ -47,6 +51,10 @@ void main() distance_along_line = distance(p1, p2); } + +#ifdef USE_WORLD_CLIP_PLANES + world_clip_planes_set_clip_distance(gl_in[1].gl_ClipDistance); +#endif EmitVertex(); EndPrimitive(); |