I'm trying to simply sample the camera's depth texture from an hlsl shader. Supposedly all you need to do is declare a sampler2d "_CameraDepthTexture" but this has not worked for me. I've tried sampling with tex2D and tex2Dlod but the output is a solid grey . I've tried sampling with UV and screen position.
Anyone know what I'm doing wrong?
Thanks.
↧