Fix related to T55961: Glitch in selecting loose edges on some AMD drives.
This commit is contained in:
parent
c2afa3ef46
commit
22814ca555
|
@ -30,6 +30,15 @@ out float facing;
|
|||
/* See fragment shader */
|
||||
flat out vec2 ssPos[3];
|
||||
|
||||
/* Some bugged AMD drivers need these global variables. See T55961 */
|
||||
#ifdef VERTEX_SELECTION
|
||||
vec3 vertex_color[3];
|
||||
#endif
|
||||
|
||||
#ifdef VERTEX_FACING
|
||||
float v_facing[3];
|
||||
#endif
|
||||
|
||||
/* project to screen space */
|
||||
vec2 proj(vec4 pos)
|
||||
{
|
||||
|
@ -39,11 +48,11 @@ vec2 proj(vec4 pos)
|
|||
void doVertex(int v, vec4 pos)
|
||||
{
|
||||
#ifdef VERTEX_SELECTION
|
||||
vertexColor = EDIT_MESH_vertex_color(vData[v].x).rgb;
|
||||
vertexColor = vertex_color[v];
|
||||
#endif
|
||||
|
||||
#ifdef VERTEX_FACING
|
||||
facing = vFacing[v];
|
||||
facing = v_facing[v];
|
||||
#endif
|
||||
|
||||
gl_Position = pos;
|
||||
|
@ -80,6 +89,17 @@ void main()
|
|||
dirs2 *= pPos[1].w;
|
||||
}
|
||||
|
||||
#ifdef VERTEX_SELECTION
|
||||
vertex_color[0] = EDIT_MESH_vertex_color(vData[0].x).rgb;
|
||||
vertex_color[1] = EDIT_MESH_vertex_color(vData[1].x).rgb;
|
||||
#endif
|
||||
|
||||
#ifdef VERTEX_FACING
|
||||
/* Weird but some buggy AMD drivers need this. */
|
||||
v_facing[0] = vFacing[0];
|
||||
v_facing[1] = vFacing[1];
|
||||
#endif
|
||||
|
||||
/* Edge / Vert data */
|
||||
ssPos[0] = ssPos[2] = pos[0];
|
||||
ssPos[1] = pos[1];
|
||||
|
|
Loading…
Reference in New Issue