Selaa lähdekoodia

Merge pull request #107893 from beicause/mobile-fix-vertex-color-writing

Vulkan Mobile: Fix writing vertex color in spatial shader
Thaddeus Crews 1 kuukausi sitten
vanhempi
commit
88b9932ce1

+ 4 - 4
servers/rendering/renderer_rd/shaders/forward_mobile/scene_forward_mobile.glsl

@@ -380,10 +380,6 @@ void vertex_shader(in vec3 vertex,
 		model_normal_matrix = model_normal_matrix * mat3(matrix);
 	}
 
-#if defined(COLOR_USED)
-	color_interp = hvec4(color_highp);
-#endif
-
 #ifdef UV_USED
 	uv_interp = uv_attrib;
 #endif
@@ -445,6 +441,10 @@ void vertex_shader(in vec3 vertex,
 #CODE : VERTEX
 	}
 
+#if defined(COLOR_USED)
+	color_interp = hvec4(color_highp);
+#endif
+
 	half roughness = half(roughness_highp);
 
 // using local coordinates (default)