Skip to content

LightShadow: Support Reversed Depth #31496

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 25, 2025

Conversation

WestLangley
Copy link
Collaborator

Previously, the shadow matrix mapped z to [ 0.5, 1 ] instead of [ 0, 1 ] when a reversed-depth projection matrix was used.

@WestLangley WestLangley added this to the r179 milestone Jul 25, 2025
Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 338.22
78.88
338.22
78.88
+0 B
+0 B
WebGPU 560.72
155.17
560.72
155.17
+0 B
+0 B
WebGPU Nodes 559.64
154.96
559.64
154.96
+0 B
+0 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 469.49
113.56
469.49
113.56
+0 B
+0 B
WebGPU 635.72
172.04
635.78
172.05
+59 B
+13 B
WebGPU Nodes 590.37
161.29
590.43
161.3
+59 B
+16 B

@Mugen87 Mugen87 merged commit b33936f into mrdoob:dev Jul 25, 2025
9 checks passed
@WestLangley WestLangley deleted the dev-lightshadow_reversed_depth branch July 25, 2025 14:48
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.

2 participants