diff options
Diffstat (limited to 'source/blender/draw/modes/shaders/paint_weight_vert.glsl')
-rw-r--r-- | source/blender/draw/modes/shaders/paint_weight_vert.glsl | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/source/blender/draw/modes/shaders/paint_weight_vert.glsl b/source/blender/draw/modes/shaders/paint_weight_vert.glsl index ab0fb775e54..d111f3dc0a8 100644 --- a/source/blender/draw/modes/shaders/paint_weight_vert.glsl +++ b/source/blender/draw/modes/shaders/paint_weight_vert.glsl @@ -2,11 +2,6 @@ uniform mat4 ModelViewProjectionMatrix; uniform mat4 ModelMatrix; -#ifdef USE_WORLD_CLIP_PLANES -uniform vec4 WorldClipPlanes[6]; -uniform int WorldClipPlanesLen; -#endif - in float weight; in vec3 pos; @@ -20,11 +15,6 @@ void main() weight_interp = max(vec2(weight, -weight), 0.0); #ifdef USE_WORLD_CLIP_PLANES - { - vec3 worldPosition = (ModelMatrix * vec4(pos, 1.0)).xyz; - for (int i = 0; i < WorldClipPlanesLen; i++) { - gl_ClipDistance[i] = dot(WorldClipPlanes[i].xyz, worldPosition) + WorldClipPlanes[i].w; - } - } + world_clip_planes_calc_clip_distance((ModelMatrix * vec4(pos, 1.0)).xyz); #endif } |