-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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: Fix filterable depth textures #30023
Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
That sounds interesting, because since I think r165 I have to use the depthTexture with f32 in the shader, which I find very nice but the sampling has suffered a bit compared to the way with texture_depth_2d and its sampler. Sometimes I see very fine seems with the scalar depth value. It's nothing that really bothers me but with texture_depth_2d and sampler the quality was perfect.
Sounds almost like texture_depth_2d is usable again with sampler. |
I remember you had commented, in theory it should solve, I just haven't tested it in |
I'm curious and will add your extension locally to test it. I now need the depth texture for occlusion culling anyway. I'm confident. Everything else is going like clockwork too. |
Ah, so the type will extended.
But now I can also use texture_depth_2d in the compute shader. Just samplers don't work. Since samplers and textureSampleLevel can be used in compute shaders, I added them in 3 places in the WGSLNodeBuilder and it works. |
I noticed a small conflict. The line:
in this function in the WGSLNodeBuilder.js corrupt #30033.
@sunag is the line essential? |
Adding |
Related issue: #28784 (comment)
Description
The problem seems a bit more complicated than it seems. We needed a
Texture.renderTarget
property to bindRenderTarget
to getRenderTarget.samples
and thus handle it inWebGPUBackend
.I tried to make
Texture.isRenderTargetTexture
become a get if.renderTarget !== null
but this seems to break the tests inWebGLRenderer
so I kept the property.Now
webgpu_backdrop_water
work with antialias.