소스 검색

Merge pull request #8306 from Popov72/detailmap

Fix detail map when no bump mapping in standard material
David Catuhe 5 년 전
부모
커밋
48c19a1e7d
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  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