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

WebGPURenderer: Add cube face to readRenderTargetPixelsAsync parameters #29323

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

aardgoose
Copy link
Contributor

Related issue: comment

Add support reading cube textures to readRenderTargetPixelsAsync().

Not tested with cube textures.

Copy link

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

Mugen87 commented Sep 4, 2024

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

@aardgoose
Copy link
Contributor Author

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

@Mugen87 Mugen87 merged commit b7f955b into mrdoob:dev Sep 4, 2024
12 checks passed
@aardgoose aardgoose deleted the lprobe branch September 9, 2024 11:07
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