Selaa lähdekoodia

Fix bug when no light was in the scene

Temechon 9 vuotta sitten
vanhempi
commit
41291df596
1 muutettua tiedostoa jossa 4 lisäystä ja 1 poistoa
  1. 4 1
      materialsLibrary/materials/normal/normal.fragment.fx

+ 4 - 1
materialsLibrary/materials/normal/normal.fragment.fx

@@ -60,7 +60,10 @@ void main(void) {
 	baseColor.rgb *= vDiffuseInfos.y;
 #endif
 
-baseColor = mix(baseColor, vec4(vNormalW, 1.0), 0.5);
+#ifdef NORMAL
+    baseColor = mix(baseColor, vec4(vNormalW, 1.0), 0.5);
+#endif
+
 #ifdef VERTEXCOLOR
 	baseColor.rgb *= vColor.rgb;
 #endif