Original Post
Hello, I am currently developing some postprocessing effect using C# and DirectX9. Basically the scene is rendered in a texture by using RenderToSurface and next I render the texture in a quad and apply the post effect. For many effects like depth of field I need to store the depth so I decided to store the depth in the alpha. But unfortunalety when I try to get the alpha (depth) it's always 1. This is how the RenderToSurface is defined RTS_ = new RenderToSurface(device_, (int)BACKBUFFER_WIDTH, (int)BACKBUFFER_HEIGHT, Format.X8R8G8B8, true, DepthFormat.D24X8); and this is the code for the texture Texture(device_, (int)BACKBUFFER_WIDTH, (int)BACKBUFFER_HEIGHT, 1, Usage.RenderTarget, Format.X8R8G8B8, Pool.Default); Any idea why the alpha is always equal to 1 ? Thank you for your help Vince