In section 15.2.1 of GL 4.3, it says:
"Texture lookups involving textures with depth component data generate a tex-ture base color Cb either using depth data directly or by performing a comparison with the Dref value used to perform the lookup, as described in section 8.22.1, and expanding the resulting value Rt to a color Cb = (Rt; 0; 0; 1). Swizzling is then performed as described above, but only the first component Cs is re-turned to the shader."
It is not clear whether the last sentence is referring to *comparison* access alone or if *all* depth component accesses only return the first component. Depth texture accesses do return 4 values, but shadow accesses only return 1.
So... does swizzling work for non-shadow depth accesses or not?
We're actively looking at this now. The spec is unclear on swizzle behavior
in the non-comparison case so we need to figure out what implementations
have actually chosen to do before trying to resolve this. Thanks for the
We've polled everyone and established that swizzling is performed for
all depth component accesses; a clarification to this effect will
appear in the next 4.4 spec update. Thanks!