Skip to content

WebGPURenderer: Refactor env map rotation.#33232

Merged
Mugen87 merged 3 commits into
mrdoob:devfrom
Mugen87:dev6
Mar 24, 2026
Merged

WebGPURenderer: Refactor env map rotation.#33232
Mugen87 merged 3 commits into
mrdoob:devfrom
Mugen87:dev6

Conversation

@Mugen87

@Mugen87 Mugen87 commented Mar 24, 2026

Copy link
Copy Markdown
Collaborator

Related issue: #33077

Description

Refactors the env map rotation logic in MaterialProperties and SceneProperties by using the cleaner matrix approach from #33077.

@WestLangley The code looks a bit different compared to WebGLRenderer since the flip is implemented in CubeTextureNode. Because of the way how the code is organized with nodes , I've sticked to the current approach and just fixed the order how transformation is applied (first rotation, then flip). That was definitely wrong in WebGPURenderer.

webgpu_materials_envmaps renders as webgl_materials_envmaps and even the user provided test case in #33077 (comment) renders correctly in WebGPURenderer.

@Mugen87 Mugen87 added this to the r184 milestone Mar 24, 2026
@github-actions

github-actions Bot commented Mar 24, 2026

Copy link
Copy Markdown

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 360.82
85.68
360.82
85.68
+0 B
+0 B
WebGPU 632.76
175.53
632.7
175.45
-65 B
-72 B
WebGPU Nodes 630.88
175.24
630.82
175.17
-65 B
-69 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 493.02
120.25
493.02
120.25
+0 B
+0 B
WebGPU 705.19
190.5
705.15
190.48
-47 B
-18 B
WebGPU Nodes 654.41
177.78
654.37
177.74
-47 B
-40 B

@Mugen87 Mugen87 marked this pull request as ready for review March 24, 2026 12:21
@Mugen87 Mugen87 merged commit d7798d2 into mrdoob:dev Mar 24, 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.

1 participant