Browse Source

Fix detail map when no bump mapping in standard material

Popov72 5 years ago
parent
commit
7e9508641f
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/Shaders/ShadersInclude/bumpFragment.fx

+ 3 - 2
src/Shaders/ShadersInclude/bumpFragment.fx

@@ -6,7 +6,7 @@
 	#elif defined(BUMP)
 		float normalScale = vBumpInfos.y;
 	#else
-		float normalScale = vDetailInfos.z;
+		float normalScale = 1.0;
 	#endif
 
 	#if defined(TANGENT) && defined(NORMAL)
@@ -61,6 +61,7 @@
         #endif
         normalW = perturbNormalBase(TBN, blendedNormal, vBumpInfos.y);
 	#endif
-#elif defined(DETAIL)    
+#elif defined(DETAIL)
+        detailNormal.xy *= vDetailInfos.z;
 		normalW = perturbNormalBase(TBN, detailNormal, vDetailInfos.z);
 #endif