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

Extension of the WebGPU copyTextureToTexture function for array textures #29364

Merged
merged 2 commits into from
Sep 8, 2024

Conversation

Spiri0
Copy link
Contributor

@Spiri0 Spiri0 commented Sep 8, 2024

So far you can only use the copyTextureToTexture function to copy from one simple texture to another simple texture. But it is also desirable to be able to copy from a simple texture to an array texture and vice versa. That's why I expanded the function a little bit to make this possible. I tested that straight away too. In my app I had no impact on the existing code, but I can now copy textures into array textures. The 1 in line 1450 means that only one layer should be copied.

Copy link

github-actions bot commented Sep 8, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 685.24
169.64
685.24
169.64
+0 B
+0 B
WebGPU 826.2
221.55
826.23
221.58
+28 B
+25 B
WebGPU Nodes 825.78
221.46
825.81
221.49
+28 B
+25 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 462.02
111.48
462.02
111.48
+0 B
+0 B
WebGPU 525.3
141.56
525.32
141.58
+28 B
+24 B
WebGPU Nodes 481.95
131.37
481.98
131.39
+28 B
+25 B

remove empty space
@Spiri0 Spiri0 changed the title Extension of the copyTextureToTexture function Extension of the WebGPU copyTextureToTexture function for array textures Sep 8, 2024
@sunag sunag added this to the r169 milestone Sep 8, 2024
@sunag sunag merged commit 18b66b7 into mrdoob:dev Sep 8, 2024
12 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.

2 participants