Parcourir la source

Added handling of flipSided also to normal map shader.

See #2352
alteredq il y a 13 ans
Parent
commit
af9fb1d193
2 fichiers modifiés avec 6 ajouts et 0 suppressions
  1. 0 0
      build/three.min.js
  2. 6 0
      src/extras/ShaderUtils.js

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
build/three.min.js


+ 6 - 0
src/extras/ShaderUtils.js

@@ -275,6 +275,12 @@ THREE.ShaderUtils = {
 					"mat3 tsb = mat3( normalize( vTangent ), normalize( vBinormal ), normalize( vNormal ) );",
 					"vec3 finalNormal = tsb * normalTex;",
 
+					"#ifdef FLIP_SIDED",
+
+						"finalNormal = -finalNormal;",
+
+					"#endif",
+
 					"vec3 normal = normalize( finalNormal );",
 					"vec3 viewPosition = normalize( vViewPosition );",
 

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff