Filtering of shadow textures (depth textures with ref-to-texture comparison enabled) is implementation-dependent. textureGather would be expected to yield values which are either 0.0 or 1.0, while texture may perform some kind of filtering. The wording of the 4.6 specification is (8.23.1):
Hmmm…
It explains why I have good result with shadow casting using too small bias = 0.0005. It is possible because of linear approximation.
So, if I use NEAREST flag I’ll have exact value for both of ‘textureGather’ and ‘texture’ functions. Am I right?