You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I looked through the examples for shadows and didn't find one where a shadow map with a custom shader is used. Since WebGPU allows you to create multiple geometries with compute shaders in the GPU and also their worldMatrices and store these directly in structArrays in storageBuffers, there is a need to be able to use shadow maps in your own shaders.
I tried to use sampler_comparison but I get an error message. I have a modified example from the examples in which you can see what the shadow texture looks like. If I integrate the sampler into the shader, the shader no longer works.
Make sampler_comparison available for wgslFn so that you can use textureSampleCompare for shadowMaps in own shaders
Alternatives
I haven't an idea of a good alternative, if there is one. sampler_comparison only appears in one place in the WGSLNodeBuilder. So I hope that it won't be too much work. I'm not very familiar with this part of the code, otherwise I would try to solve it by myself
Additional context
No response
The text was updated successfully, but these errors were encountered:
Description
I looked through the examples for shadows and didn't find one where a shadow map with a custom shader is used. Since WebGPU allows you to create multiple geometries with compute shaders in the GPU and also their worldMatrices and store these directly in structArrays in storageBuffers, there is a need to be able to use shadow maps in your own shaders.
I tried to use
sampler_comparison
but I get an error message. I have a modified example from the examples in which you can see what the shadow texture looks like. If I integrate the sampler into the shader, the shader no longer works.https://codepen.io/Spiri0/pen/xbxreyr
Insert line 129 under line 137
Solution
Make
sampler_comparison
available for wgslFn so that you can use textureSampleCompare for shadowMaps in own shadersAlternatives
I haven't an idea of a good alternative, if there is one.
sampler_comparison
only appears in one place in the WGSLNodeBuilder. So I hope that it won't be too much work. I'm not very familiar with this part of the code, otherwise I would try to solve it by myselfAdditional context
No response
The text was updated successfully, but these errors were encountered: