I have a shadow map with enabled hardware percentage-closer filtering. But I also need to get the depth value stored in the shadow map in order to use it for implementing other techniques in the pixel shader. The problem is that all sampling functions (tex2D, tex2Dproj) return the final result of depth comparison. It works well but I cannot get the depth value itself.
Is it possible to preserve hardware PCF for shadow mapping and sample the depth value itself?
There's a limitation though, I cannot handle how the shadow map is created by the application, I can only edit shaders.