From f3002d8d7267cf10e50de7c5698eb0e47977d805 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Tue, 28 Apr 2026 03:28:03 +0200 Subject: [PATCH] refactor: Rename camera reference to sourceCamera in SSGI pass --- src/rendering/screen-space-global-illumination.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/rendering/screen-space-global-illumination.ts b/src/rendering/screen-space-global-illumination.ts index dae77826..56299edb 100644 --- a/src/rendering/screen-space-global-illumination.ts +++ b/src/rendering/screen-space-global-illumination.ts @@ -242,7 +242,7 @@ void main() { `; export class ScreenSpaceGlobalIlluminationPass extends Pass { - private readonly camera: PerspectiveCamera; + private readonly sourceCamera: PerspectiveCamera; private readonly material: ShaderMaterial; private readonly parameters: ResolvedDynamicGlobalIlluminationParameters; private readonly resolution = new Vector2(1, 1); @@ -257,7 +257,7 @@ export class ScreenSpaceGlobalIlluminationPass extends Pass { ) { super("ScreenSpaceGlobalIlluminationPass"); - this.camera = camera; + this.sourceCamera = camera; this.parameters = parameters; this.needsDepthTexture = true; @@ -312,10 +312,12 @@ export class ScreenSpaceGlobalIlluminationPass extends Pass { return; } - this.camera.updateProjectionMatrix(); - this.cameraNearFar.set(this.camera.near, this.camera.far); - this.cameraProjectionMatrix.copy(this.camera.projectionMatrix); - this.cameraProjectionMatrixInverse.copy(this.camera.projectionMatrixInverse); + this.sourceCamera.updateProjectionMatrix(); + this.cameraNearFar.set(this.sourceCamera.near, this.sourceCamera.far); + this.cameraProjectionMatrix.copy(this.sourceCamera.projectionMatrix); + this.cameraProjectionMatrixInverse.copy( + this.sourceCamera.projectionMatrixInverse + ); this.material.uniforms.inputBuffer.value = inputBuffer.texture; this.material.uniforms.intensity.value = this.parameters.intensity; this.material.uniforms.radius.value = this.parameters.radius;