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-01-21 15:51:34 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-01-21 15:55:53 +0300
commit9bc47ed0f6d0db9e43af30c741a7e5ac347cbecd (patch)
treeca8dbd6ce37e3529a3c5fe8c0bc944c535128ec3 /source/blender/draw/modes/shaders/edit_mesh_overlay_facefill_vert.glsl
parent0c829e8240eebd7ce4ed9d61f8682c0d6bf534f4 (diff)
Fix clipping shaders with some AMD/Intel drivers
Caused: error: unsized array index must be constant Use hard coded number of clipping planes, copying the 4th to 5 & 6 when only 4 are used.
Diffstat (limited to 'source/blender/draw/modes/shaders/edit_mesh_overlay_facefill_vert.glsl')
-rw-r--r--source/blender/draw/modes/shaders/edit_mesh_overlay_facefill_vert.glsl12
1 files changed, 1 insertions, 11 deletions
diff --git a/source/blender/draw/modes/shaders/edit_mesh_overlay_facefill_vert.glsl b/source/blender/draw/modes/shaders/edit_mesh_overlay_facefill_vert.glsl
index fa808b4fdb9..95630fc2e0f 100644
--- a/source/blender/draw/modes/shaders/edit_mesh_overlay_facefill_vert.glsl
+++ b/source/blender/draw/modes/shaders/edit_mesh_overlay_facefill_vert.glsl
@@ -3,11 +3,6 @@ uniform mat4 ModelViewProjectionMatrix;
uniform mat4 ModelMatrix;
uniform ivec4 dataMask = ivec4(0xFF);
-#ifdef USE_WORLD_CLIP_PLANES
-uniform vec4 WorldClipPlanes[6];
-uniform int WorldClipPlanesLen;
-#endif
-
in vec3 pos;
in ivec4 data;
@@ -33,11 +28,6 @@ void main()
faceColor = colorFace;
#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
}