All sampling operations on shadow samplers require depth ref in GLSL 3.1, i.e. they are all compare operations as defined by our spec.
For shadow forms (the sampler parameter is a shadow-type), a depth comparison lookup on the depth
texture bound to sampler is done as described in section 8.19 “Texture Comparison Modes” of the
OpenGL ES Graphics System Specification. See the table below for which component specifies Dref. The
texture bound to sampler must be a depth texture, or results are undefined. If a non-shadow texture call is
made to a sampler that represents a depth texture with depth comparisons turned on, then results are
undefined. If a shadow texture call is made to a sampler that represents a depth texture with depth
comparisons turned off, then results are undefined. If a shadow texture call is made to a sampler that does
not represent a depth texture, then results are undefined.
from Section 8.9 Texture Functions of https://registry.khronos.org/OpenGL/specs/es/3.1/GLSL_ES_Specification_3.10.withchanges.pdf
Sparked from gfx-rs/wgpu#6529 (comment).
All sampling operations on shadow samplers require depth ref in GLSL 3.1, i.e. they are all compare operations as defined by our spec.
from Section 8.9 Texture Functions of https://registry.khronos.org/OpenGL/specs/es/3.1/GLSL_ES_Specification_3.10.withchanges.pdf
Sparked from gfx-rs/wgpu#6529 (comment).