sergi.gonzalez
Newcomer
Hi all,
I need to use the depth buffer as texture in order to apply several post processing effects (like Depth Of Field, Atmospheric scattering, etc.).
In order to perform FSAA, I render the scene to multisample color and depth surfaces. Later, I call stretchRect to resolve multisample color fragments into a color texture.
My questions:
1. Is it possible to resolve a multisample depth buffer into a color/depth texture?
DirectX9 documentation states it is not possible (stretchrect has additional restrictions for depth stencil surfaces).
2. Render the scene with a renderz-only shader into a multisample color texture is the unique solution?
3. Any alternative (render depth to color buffer alpha channel is not useful for me) ?
Thanks in advance,
Sergi
I need to use the depth buffer as texture in order to apply several post processing effects (like Depth Of Field, Atmospheric scattering, etc.).
In order to perform FSAA, I render the scene to multisample color and depth surfaces. Later, I call stretchRect to resolve multisample color fragments into a color texture.
My questions:
1. Is it possible to resolve a multisample depth buffer into a color/depth texture?
DirectX9 documentation states it is not possible (stretchrect has additional restrictions for depth stencil surfaces).
2. Render the scene with a renderz-only shader into a multisample color texture is the unique solution?
3. Any alternative (render depth to color buffer alpha channel is not useful for me) ?
Thanks in advance,
Sergi