This repository has been archived on 2023-10-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
blender-archive/source/blender/draw/modes/shaders/edit_normals_geom.glsl
Campbell Barton 9bc47ed0f6 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.
2019-01-21 23:55:53 +11:00

19 lines
328 B
GLSL

layout(points) in;
layout(line_strip, max_vertices=2) out;
flat in vec4 v1[1];
flat in vec4 v2[1];
void main()
{
for (int v = 0; v < 2; v++) {
gl_Position = (v == 0) ? v1[0] : v2[0];
#ifdef USE_WORLD_CLIP_PLANES
world_clip_planes_set_clip_distance(gl_in[0].gl_ClipDistance);
#endif
EmitVertex();
}
EndPrimitive();
}