From 1348993205c377c7eae5ab667af7fa4fe37ce519 Mon Sep 17 00:00:00 2001 From: Garrett Johnson Date: Mon, 10 Oct 2022 22:16:26 -0700 Subject: [PATCH] Add support for reflecting the background directly --- src/materials/PhysicalPathTracingMaterial.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/materials/PhysicalPathTracingMaterial.js b/src/materials/PhysicalPathTracingMaterial.js index 751ca5eb8..96ca85ebf 100644 --- a/src/materials/PhysicalPathTracingMaterial.js +++ b/src/materials/PhysicalPathTracingMaterial.js @@ -483,7 +483,7 @@ export class PhysicalPathTracingMaterial extends MaterialBase { if ( ! hit ) { - if ( i == 0 || transmissiveRay ) { + if ( i == 0 || transmissiveRay || i == 1 && ! isShadowRay ) { gl_FragColor.rgb += sampleBackground( environmentRotation * rayDirection ) * throughputColor; gl_FragColor.a = backgroundAlpha;