[Bf-blender-cvs] [9a38a91f411] blender2.8: Fix T55961: Anomalous edges cage on some AMD buggy drivers.

mano-wii noreply at git.blender.org
Sun Oct 14 19:08:06 CEST 2018


Commit: 9a38a91f411b721eb8f61401fdc86521933aec87
Author: mano-wii
Date:   Sun Oct 14 14:07:19 2018 -0300
Branches: blender2.8
https://developer.blender.org/rB9a38a91f411b721eb8f61401fdc86521933aec87

Fix T55961: Anomalous edges cage on some AMD buggy drivers.

Reviwed on irc by @fclem.

===================================================================

M	source/blender/draw/modes/shaders/edit_mesh_overlay_geom_tri.glsl

===================================================================

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). */



More information about the Bf-blender-cvs mailing list