diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-01-29 11:57:35 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-01-29 12:27:28 +0300 |
commit | 851d58b34f11f73403729d595116a1b189093821 (patch) | |
tree | d625e9c374953cc2630e4292aae3ac62df3f6894 /source/blender/gpu/shaders/gpu_shader_3D_passthrough_vert.glsl | |
parent | 68ae1f4958e24906992a3207726c0031de9524b5 (diff) |
DRW: support clipping for all lamp types
Diffstat (limited to 'source/blender/gpu/shaders/gpu_shader_3D_passthrough_vert.glsl')
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_3D_passthrough_vert.glsl | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_3D_passthrough_vert.glsl b/source/blender/gpu/shaders/gpu_shader_3D_passthrough_vert.glsl index 60793bf56b6..4196dbbad02 100644 --- a/source/blender/gpu/shaders/gpu_shader_3D_passthrough_vert.glsl +++ b/source/blender/gpu/shaders/gpu_shader_3D_passthrough_vert.glsl @@ -1,8 +1,16 @@ +#ifdef USE_WORLD_CLIP_PLANES +uniform mat4 ModelMatrix; +#endif /* Does Nothing */ in vec3 pos; void main() { - gl_Position = vec4(pos, 1.0); + vec4 pos_4d = vec4(pos, 1.0); + gl_Position = pos_4d; + +#ifdef USE_WORLD_CLIP_PLANES + world_clip_planes_calc_clip_distance((ModelMatrix * pos_4d).xyz); +#endif } |