Skip to content

CameraHelper: Fix usage with WebGPU.#30136

Merged
Mugen87 merged 2 commits intomrdoob:devfrom
AlaricBaraou:fix-cameraHelper
Dec 16, 2024
Merged

CameraHelper: Fix usage with WebGPU.#30136
Mugen87 merged 2 commits intomrdoob:devfrom
AlaricBaraou:fix-cameraHelper

Conversation

@AlaricBaraou
Copy link
Copy Markdown
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💶

@github-actions
Copy link
Copy Markdown

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
@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