wgpu icon indicating copy to clipboard operation
wgpu copied to clipboard

fix(gles): Only use sampler2DShadow if comparison samplers are used

Open DerSchmale opened this issue 1 month ago • 0 comments

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.

DerSchmale avatar Dec 09 '25 13:12 DerSchmale