-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
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 conflict with depth sampler #30113
base: dev
Are you sure you want to change the base?
Conversation
Arrays are not currently taken into account by the wgslTypeLib. However, with the struct extension mrdoob#29908, arrays will also become important as a type.
Update WGSLNodeBuilder.js
Since textureSampleLevel is usable in compute shaders, this small PR allows sampler to be used in compute shaders for this purpose
enables the use of samplers in compute shaders
…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.
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
This would not be contrary to this issue? #29852 |
I only use the NearestFilter for depthTextures. That would be compatible with the warning that is there in #29852. The sampler no longer works with the line, although NearestFilter is set by me. What are the filters for depth textures set by default? I can take a look at that later. I could also switch to textureLoad for the time being, but in the long run it would of course be better if the textureSampleLevel could be used for compute shaders, because uv coordinates are already practical. |
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: #30033 #30023