Hi I have a somewhat stupid question.
I want to make textureFX that uses a depthbufer and according to the depth value creates a mask
This DepthThreshold texturefx should be used to mask the background and replace it with alpha.
My simple approach was just like this
float4 c = texture2d.Sample(linearSampler,input.uv);
if (c.r<0) c.rgba = float4(0.0,0.0,0.0,0.0);
so it should draw black for every pixel with depth smaller then 0 (the threshold).
I think I am missing something with the depth, eventually i have to map it, saturate it or something like this to get usable values?