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

Fix sampler conflict with #30033 for depthTexture in WGSLNodeBuilder.js #6

Closed
wants to merge 4 commits into from

Conversation

Spiri0
Copy link
Owner

@Spiri0 Spiri0 commented Dec 12, 2024

The depth textures were excluded from the sampling by the compare. But depth textures are sampleable in WebGPU. But even if you don't sample, you can use the sampler for textureSampleLevel. Instead of screen coordinates like you have to use in the case of textureLoad, you can use uv coordinates with textureSampleLevel and mip 0, which is very practical.

Related issue: mrdoob#30033

…ilder.js

The depth textures were excluded from the sampling by the compare. But depth textures are sampleable in WebGPU. But even if you don't sample, you can use the sampler for textureSampleLevel. Instead of screen coordinates like you have to use in the case of textureLoad, you can use uv coordinates with textureSampleLevel and mip 0, which is very practical.
Copy link

github-actions bot commented Dec 12, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 339.21
79.01
339.21
79.01
+0 B
+0 B
WebGPU 486.52
135.06
486.23
134.95
-290 B
-115 B
WebGPU Nodes 485.99
134.97
485.7
134.85
-290 B
-119 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 465.1
112.06
465.1
112.06
+0 B
+0 B
WebGPU 555.63
150.5
555.34
150.37
-288 B
-122 B
WebGPU Nodes 511.48
140.21
511.19
140.09
-288 B
-123 B

@Spiri0 Spiri0 closed this Feb 8, 2025
@Spiri0 Spiri0 deleted the Fix-conflict-with-depth-sampler branch February 8, 2025 07:31
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