Skip to content

WebGLShadowMap: Fix wrong camera state.#32777

Merged
Mugen87 merged 1 commit into
mrdoob:devfrom
Mugen87:dev5
Jan 17, 2026
Merged

WebGLShadowMap: Fix wrong camera state.#32777
Mugen87 merged 1 commit into
mrdoob:devfrom
Mugen87:dev5

Conversation

@Mugen87

@Mugen87 Mugen87 commented Jan 17, 2026

Copy link
Copy Markdown
Collaborator

Fixed #31661.

Description

WebGLShadowMap did not correctly delegate the reversedDepth state to the shadow cameras leading to wrong shadow matrices. This wrong matrix was responsible for the incorrect shadow coords and thus the mentioned inconsistent results. Fixing the shadow matrix/shadow coordinates requires some updates in the shader.

@Mugen87 Mugen87 added this to the r183 milestone Jan 17, 2026
@github-actions

Copy link
Copy Markdown

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 355.49
84.51
355.82
84.56
+336 B
+43 B
WebGPU 621.04
172.46
621.04
172.46
+0 B
+0 B
WebGPU Nodes 619.64
172.22
619.64
172.22
+0 B
+0 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 487.72
119.41
488.06
119.45
+336 B
+43 B
WebGPU 691.97
187.85
691.97
187.85
+0 B
+0 B
WebGPU Nodes 641.77
175.01
641.77
175.01
+0 B
+0 B

@Mugen87 Mugen87 merged commit 1b7857e into mrdoob:dev Jan 17, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ShadowMap breaks when using reversedDepthBuffer

1 participant