소스 검색

Merge pull request #7247 from sebavan/master

Clear coat conservation Factor
David Catuhe 5 년 전
부모
커밋
41c8fb0b6c
2개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 2 2
      src/Shaders/ShadersInclude/lightFragment.fx
  2. 3 3
      src/Shaders/pbr.fragment.fx

+ 2 - 2
src/Shaders/ShadersInclude/lightFragment.fx

@@ -103,10 +103,10 @@
                 // Apply energy conservation on diffuse and specular term.
                 info.diffuse *= info.clearCoat.w;
                 #ifdef SPECULARTERM
-                    info.specular *= info.clearCoat.w * info.clearCoat.w;
+                    info.specular *= info.clearCoat.w;
                 #endif
                 #ifdef SHEEN
-                    info.sheen *= info.clearCoat.w * info.clearCoat.w;
+                    info.sheen *= info.clearCoat.w;
                 #endif
             #endif
         #else

+ 3 - 3
src/Shaders/pbr.fragment.fx

@@ -950,10 +950,10 @@ void main(void) {
         #endif
 
         #ifdef SHEEN
-            sheenEnvironmentReflectance *= (conservationFactor * conservationFactor);
+            sheenEnvironmentReflectance *= conservationFactor;
         #endif
 
-        specularEnvironmentReflectance *= (conservationFactor * conservationFactor);
+        specularEnvironmentReflectance *= conservationFactor;
     #endif
 
     // _____________________________ Transmittance + Tint ________________________________
@@ -1095,7 +1095,7 @@ void main(void) {
         #endif
 
         #ifdef SS_REFRACTION
-            finalRefraction *= (conservationFactor * conservationFactor);
+            finalRefraction *= conservationFactor;
             #ifdef CLEARCOAT_TINT
                 finalRefraction *= absorption;
             #endif