wgpu
wgpu copied to clipboard
fix(gles): Only use sampler2DShadow if comparison samplers are used
Description When declaring a texture_depth_2d in a shader, naga always outputs the texture uniform as type sampler2DShadow. When only interested in depth values and not comparisons, this breaks. This PR only uses sampler2DShadow when a comparison sampler is used for it. This is the only fix that I could come up with that only impacts the gles part.
This is a redo of closed PR https://github.com/gfx-rs/wgpu/pull/8301 , with fixed tests.