diff options
Diffstat (limited to 'source/blender/draw/modes/shaders/object_outline_prepass_vert.glsl')
-rw-r--r-- | source/blender/draw/modes/shaders/object_outline_prepass_vert.glsl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/draw/modes/shaders/object_outline_prepass_vert.glsl b/source/blender/draw/modes/shaders/object_outline_prepass_vert.glsl index ba824a7c007..744bf0ff1e3 100644 --- a/source/blender/draw/modes/shaders/object_outline_prepass_vert.glsl +++ b/source/blender/draw/modes/shaders/object_outline_prepass_vert.glsl @@ -1,6 +1,7 @@ uniform mat4 ModelViewMatrix; uniform mat4 ModelViewProjectionMatrix; +uniform mat4 ModelMatrix; in vec3 pos; @@ -13,4 +14,8 @@ void main() pPos = ModelViewProjectionMatrix * vec4(pos, 1.0); /* Small bias to always be on top of the geom. */ pPos.z -= 1e-3; + +#ifdef USE_WORLD_CLIP_PLANES + world_clip_planes_calc_clip_distance((ModelMatrix * vec4(pos, 1.0)).xyz); +#endif } |