Skip to content
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

CameraHelper: Fix usage with WebGPU. #30136

Merged
merged 2 commits into from
Dec 16, 2024
Merged

Conversation

AlaricBaraou
Copy link
Contributor

Description

When using the WebGPURenderer the cameraHelper would show the wrong near.

You can see how the near plane change in the camera demo between WebGLRenderer and WebGPURenderer

Before

beforeFixCameraHelper.mp4

After

fixCameraHelper.mp4

This PR also add the camera example in its WebGPURenderer version ( used to test the helper )
If you prefer without the example I can remove it.
Also please confirm that I added / edited the correct files to add an example, it's my first.

This contribution is funded by Alaric Baraou💶

Copy link

github-actions bot commented Dec 16, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 339.21
79.01
339.21
79.01
+0 B
+0 B
WebGPU 486.27
134.93
486.27
134.93
+0 B
+0 B
WebGPU Nodes 485.74
134.83
485.74
134.83
+0 B
+0 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 465.1
112.07
465.1
112.07
+0 B
+0 B
WebGPU 555.42
150.35
555.42
150.35
+0 B
+0 B
WebGPU Nodes 511.34
140.12
511.34
140.12
+0 B
+0 B

@RenaudRohlinger RenaudRohlinger added this to the r172 milestone Dec 16, 2024
@Mugen87 Mugen87 merged commit ec02bf7 into mrdoob:dev Dec 16, 2024
12 checks passed
@Mugen87 Mugen87 changed the title WebGPURenderer: fix cameraHelper CameraHelper: Fix usage with WebGPU. Dec 16, 2024
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.

3 participants