Original Post
Hello Is it possible to use a texture of format D3DFMT_D24S8 in a pixelshader? If so how will I access the depth/stencil data in the texture? Something like this? I am particularly interested in the stencil value, since thats what im planning to use. Thanks //Emil [Edited by - cannonicus on September 1, 2006 5:14:41 AM]
//HLSL shader code
sampler Tex;
sampler DSTex;
...
vector ds = tex2D(DSTex, coord);
float depth = ds.r; //This is the part im unsure about
int stenval = ds.b;