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 Video and Storage 2D Texture textureLoad Support #29992

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

RenaudRohlinger
Copy link
Collaborator

Description
https://www.w3.org/TR/webgpu/#external-texture-sampling

External textures are represented in WGSL with texture_external and may be read using textureLoad and textureSampleBaseClampToEdge.

https://www.w3.org/TR/WGSL/#textureload
image

This PR adds support to read a single texel from a video or storage texture in the vertex and compute shading.

This contribution is funded by Utsubo

@RenaudRohlinger RenaudRohlinger added this to the r171 milestone Nov 29, 2024
Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 339.14
78.99
339.14
78.99
+0 B
+0 B
WebGPU 484.61
134.47
484.69
134.48
+74 B
+10 B
WebGPU Nodes 484.08
134.37
484.15
134.38
+74 B
+11 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 464.62
111.98
464.62
111.98
+0 B
+0 B
WebGPU 553.37
149.76
553.45
149.77
+74 B
+9 B
WebGPU Nodes 509.25
139.47
509.33
139.48
+74 B
+10 B

@sunag sunag merged commit fcde431 into mrdoob:dev Nov 29, 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