Sfoglia il codice sorgente

WebGLRenderer: Fix normal maps with `DoubleSide`+ flat shading. (#33859)

Michael Herzog 4 settimane fa
parent
commit
5979e60866

+ 2 - 2
src/renderers/shaders/ShaderChunk/normal_fragment_begin.glsl.js

@@ -39,7 +39,7 @@ float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;
 
 
 	#endif
 	#endif
 
 
-	#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )
+	#ifdef DOUBLE_SIDED
 
 
 		tbn[0] *= faceDirection;
 		tbn[0] *= faceDirection;
 		tbn[1] *= faceDirection;
 		tbn[1] *= faceDirection;
@@ -60,7 +60,7 @@ float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;
 
 
 	#endif
 	#endif
 
 
-	#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )
+	#ifdef DOUBLE_SIDED
 
 
 		tbn2[0] *= faceDirection;
 		tbn2[0] *= faceDirection;
 		tbn2[1] *= faceDirection;
 		tbn2[1] *= faceDirection;

粤ICP备19079148号