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-03-16 09:37:08 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-16 09:37:08 +0300
commit6aebb5a4d5f5c0866263b8507dbed460f60ba64f (patch)
tree51ecc4f934f93e571ff483926c4a028d463c819e /source/blender/gpu/shaders/gpu_shader_3D_line_dashed_uniform_color_vert.glsl
parentdbfbd6b9043d325456225aaf4c8af7bba7cc4aa0 (diff)
DRW: support clipping for relationship lines
Diffstat (limited to 'source/blender/gpu/shaders/gpu_shader_3D_line_dashed_uniform_color_vert.glsl')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_3D_line_dashed_uniform_color_vert.glsl10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_3D_line_dashed_uniform_color_vert.glsl b/source/blender/gpu/shaders/gpu_shader_3D_line_dashed_uniform_color_vert.glsl
index 2fe08896585..791f634c6cd 100644
--- a/source/blender/gpu/shaders/gpu_shader_3D_line_dashed_uniform_color_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_3D_line_dashed_uniform_color_vert.glsl
@@ -8,6 +8,10 @@
uniform mat4 ModelViewProjectionMatrix;
+#ifdef USE_WORLD_CLIP_PLANES
+uniform mat4 ModelMatrix;
+#endif
+
uniform vec4 color;
in vec3 pos;
@@ -16,6 +20,10 @@ out vec4 color_vert;
void main()
{
- gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0);
+ vec4 pos_4d = vec4(pos, 1.0);
+ gl_Position = ModelViewProjectionMatrix * pos_4d;
color_vert = color;
+#ifdef USE_WORLD_CLIP_PLANES
+ world_clip_planes_calc_clip_distance((ModelMatrix * pos_4d).xyz);
+#endif
}