Pārlūkot izejas kodu

Merge branch 'master' into master

David Catuhe 5 gadi atpakaļ
vecāks
revīzija
bd186075e7

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

@@ -80,5 +80,6 @@
 - Fix bug in PBR when anisotropy is enabled and no bump texture is provided ([Popov72](https://github.com/Popov72)
 - Fix horizon occlusion in PBR materials ([Popov72](https://github.com/Popov72)
 - Fixed delay calculation in Animatable.goToFrame when speedRatio != 1 ([Reimund Järnfors](https://github.com/reimund)
+- Fix bug in PBR when translucency is enabled and an irradiance texture is provided ([Popov72](https://github.com/Popov72)
 
 ## Breaking changes

+ 2 - 1
src/Rendering/utilityLayerRenderer.ts

@@ -150,7 +150,8 @@ export class UtilityLayerRenderer implements IDisposable {
                 if (!this.processAllEvents) {
                     if (prePointerInfo.type !== PointerEventTypes.POINTERMOVE
                         && prePointerInfo.type !== PointerEventTypes.POINTERUP
-                        && prePointerInfo.type !== PointerEventTypes.POINTERDOWN) {
+                        && prePointerInfo.type !== PointerEventTypes.POINTERDOWN
+                        && prePointerInfo.type !== PointerEventTypes.POINTERDOUBLETAP) {
                         return;
                     }
                 }

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

@@ -1040,7 +1040,7 @@ void main(void) {
 
     // _______________________________  IBL Translucency ________________________________
     #if defined(REFLECTION) && defined(SS_TRANSLUCENCY)
-        #if defined(USESPHERICALINVERTEX)
+        #if defined(NORMAL) && defined(USESPHERICALINVERTEX) || !defined(USESPHERICALFROMREFLECTIONMAP)
             vec3 irradianceVector = vec3(reflectionMatrix * vec4(normalW, 0)).xyz;
             #ifdef REFLECTIONMAP_OPPOSITEZ
                 irradianceVector.z *= -1.0;