Sfoglia il codice sorgente

Merge branch 'master' of https://github.com/BabylonJS/Babylon.js into nme-popout-preview-background-color-bug

Kyle Belfort 5 anni fa
parent
commit
521aecab31

File diff suppressed because it is too large
+ 1 - 1
dist/preview release/babylon.js


File diff suppressed because it is too large
+ 1 - 1
dist/preview release/babylon.max.js


File diff suppressed because it is too large
+ 1 - 1
dist/preview release/babylon.max.js.map


File diff suppressed because it is too large
+ 1 - 1
dist/preview release/viewer/babylon.viewer.js


File diff suppressed because it is too large
+ 1 - 1
dist/preview release/viewer/babylon.viewer.max.js


+ 1 - 0
dist/preview release/what's new.md

@@ -348,6 +348,7 @@
 - Fix bug in PBR sheen where the sheen effect could be a little darker than expected when using direct lighting ([Popov72](https://github.com/Popov72)
 - Fix bug in PBR shader when `reflectionTexture.linearSpecularLOD` is `true`  ([Popov72](https://github.com/Popov72))
 - Fix for bug where resizing the bottom of a frame at times will not work for any frame in the graph ([#7377](https://github.com/BabylonJS/Babylon.js/issues/7672))([Kyle Belfort](https://github.com/belfortk))
+- Fix bug in PBR sheen when used with clear coat and no env texture provided ([Popov72](https://github.com/Popov72))
 - Fix for bug where Preview Area pop up does not change background color across windows ([#7377](https://github.com/BabylonJS/Babylon.js/issues/7684))([Kyle Belfort](https://github.com/belfortk))
 
 ## Breaking changes

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

@@ -935,10 +935,10 @@ void main(void) {
 
             #ifdef REFLECTION
                 environmentIrradiance *= absorption;
-            #endif
 
-            #ifdef SHEEN
-                sheenEnvironmentReflectance *= absorption;
+                #ifdef SHEEN
+                    sheenEnvironmentReflectance *= absorption;
+                #endif
             #endif
 
             specularEnvironmentReflectance *= absorption;
@@ -952,10 +952,10 @@ void main(void) {
 
         #ifdef REFLECTION
             environmentIrradiance *= conservationFactor;
-        #endif
 
-        #ifdef SHEEN
-            sheenEnvironmentReflectance *= conservationFactor;
+            #ifdef SHEEN
+                sheenEnvironmentReflectance *= conservationFactor;
+            #endif
         #endif
 
         specularEnvironmentReflectance *= conservationFactor;