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
path: root/source
diff options
context:
space:
mode:
authormano-wii <germano.costa@ig.com.br>2018-10-14 20:07:19 +0300
committermano-wii <germano.costa@ig.com.br>2018-10-14 20:07:45 +0300
commit9a38a91f411b721eb8f61401fdc86521933aec87 (patch)
tree0d9110c3f8fcbfab279857344c01754f4f0b0f52 /source
parentac61eb3900cb8bd0d43846c5ef94ea89cbe9bd9d (diff)
Fix T55961: Anomalous edges cage on some AMD buggy drivers.
Reviwed on irc by @fclem.
Diffstat (limited to 'source')
-rw-r--r--source/blender/draw/modes/shaders/edit_mesh_overlay_geom_tri.glsl28
1 files changed, 24 insertions, 4 deletions
diff --git a/source/blender/draw/modes/shaders/edit_mesh_overlay_geom_tri.glsl b/source/blender/draw/modes/shaders/edit_mesh_overlay_geom_tri.glsl
index 61f3e818020..3b7af9108e2 100644
--- a/source/blender/draw/modes/shaders/edit_mesh_overlay_geom_tri.glsl
+++ b/source/blender/draw/modes/shaders/edit_mesh_overlay_geom_tri.glsl
@@ -48,14 +48,22 @@ vec2 proj(vec4 pos)
return (0.5 * (pos.xy / pos.w) + 0.5) * viewportSize;
}
+#ifdef VERTEX_SELECTION
+vec3 vertex_color[3];
+#endif
+
+#ifdef VERTEX_FACING
+float v_facing[3];
+#endif
+
void doVertex(int v)
{
#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 = pPos[v];
@@ -65,11 +73,11 @@ void doVertex(int v)
void doVertexOfs(int v, vec2 fixvec)
{
#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 = pPos[v];
@@ -162,6 +170,18 @@ void main()
}
}
+#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;
+ vertex_color[2] = EDIT_MESH_vertex_color(vData[2].x).rgb;
+#endif
+
+#ifdef VERTEX_FACING
+ v_facing[0] = vFacing[0];
+ v_facing[1] = vFacing[1];
+ v_facing[2] = vFacing[2];
+#endif
+
/* Remember that we are assuming the last vertex
* of a triangle is the provoking vertex (decide what flat attribs are). */