Skip to content

Camera: Remove reversedDepth from user level code. #31466

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 21, 2025

Conversation

WestLangley
Copy link
Collaborator

Users should not be expected to set camera.reversedDepth on every camera. It should only be necessary to set reversedDepthBuffer: true in the renderer's constructor.

These code blocks should not be necessary, if everything goes to plan...

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

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 338.04
78.86
337.92
78.83
-114 B
-28 B
WebGPU 559.1
154.77
559.1
154.77
+0 B
+0 B
WebGPU Nodes 558.02
154.56
558.02
154.56
+0 B
+0 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 469.29
113.56
469.18
113.54
-114 B
-26 B
WebGPU 634.39
171.81
634.39
171.81
+0 B
+0 B
WebGPU Nodes 589.52
161.12
589.52
161.12
+0 B
+0 B

@Mugen87 Mugen87 changed the title Remove unnecessary code Remove Camera.reversedDepth from user level code. Jul 21, 2025
@Mugen87 Mugen87 merged commit f5c770a into mrdoob:dev Jul 21, 2025
9 checks passed
@Mugen87 Mugen87 changed the title Remove Camera.reversedDepth from user level code. Camera: Remove reversedDepth from user level code. Jul 21, 2025
@WestLangley WestLangley deleted the dev-clean_up branch July 21, 2025 21:07
@Mugen87
Copy link
Collaborator

Mugen87 commented Jul 21, 2025

We now might turn reversedDepth into a private _reversedDepth property...

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