Skip to content

WebGPURenderer: Add cube face to readRenderTargetPixelsAsync parameters#29323

Merged
Mugen87 merged 1 commit intomrdoob:devfrom
aardgoose:lprobe
Sep 4, 2024
Merged

WebGPURenderer: Add cube face to readRenderTargetPixelsAsync parameters#29323
Mugen87 merged 1 commit intomrdoob:devfrom
aardgoose:lprobe

Conversation

@aardgoose
Copy link
Copy Markdown
Contributor

Related issue: comment

Add support reading cube textures to readRenderTargetPixelsAsync().

Not tested with cube textures.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Sep 4, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 685.2 kB
169.6 kB
685.2 kB
169.6 kB
+0 B
+0 B
WebGPU 823 kB
220.9 kB
823.1 kB
220.9 kB
+80 B
+12 B
WebGPU Nodes 822.6 kB
220.8 kB
822.7 kB
220.8 kB
+499 B
+106 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 462 kB
111.5 kB
462 kB
111.5 kB
+0 B
+0 B
WebGPU 522.1 kB
140.8 kB
522.2 kB
140.8 kB
+80 B
+14 B
WebGPU Nodes 478.8 kB
130.6 kB
478.9 kB
130.6 kB
-43.26 kB
+13 B

@Mugen87 Mugen87 added this to the r169 milestone Sep 4, 2024
@aardgoose
Copy link
Copy Markdown
Contributor Author

This appears to work with a hacked LightProbeGenerator with the WebGL fallback but the differences in texture coordinates and appear to be causing issues for the WebGPU path.

@Mugen87
Copy link
Copy Markdown
Collaborator

Mugen87 commented Sep 4, 2024

But that is a separate issue right? The changes to readRenderTargetPixelsAsync() look correct, imo.

@aardgoose
Copy link
Copy Markdown
Contributor Author

Yes, it works, how the data returned is handled just needs addressing.

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