I think that it would be quite useful to have support in Ogre for true depth render textures. As in the 24 or 16 bit combined depth and stencil buffer formats. Ogre has the existing PF_DEPTH option but as far as I know it's not actually implemented. From what I've read D3D and OpenGL both support this, and the benefits of rendering depth passes to an actual depth buffer could be quite useful.
Firstly, all depth pass could be made with colour write off which gives a 2x performance boost on Nvidia hardware. Secondly it would allow hardware shadow mapping to be supported where depth checking can be handled with greater efficiency by the GPU rather than performed explicitly in shaders. And thirdly it allows bilinear filtering to be performed on the targets thereby eliminating the need to emulate filtering on 32 bit targets on GF7 or older cards.
Is there a reason why this is not yet implemented?
depth texture support
- :wumpus:
- OGRE Retired Team Member
- Posts: 3067
- Joined: Tue Feb 10, 2004 12:53 pm
- Location: The Netherlands
- x 1
Re: depth texture support
The reason that I didn't implement it back then was because OpenGL and DirectX had wildly different ideas of what depth textures were and how to use them.
It has changed now with new extensions, FBOs etc. But noone did it yet
It has changed now with new extensions, FBOs etc. But noone did it yet
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
Re: depth texture support
Basically, only NVidia hardware supported depth textures on DirectX with depth test, via a hack which enabled the feature automatically, it was never part of the standard. It will never work on any other card under DirectX.
Floating point textures are the only way to do it in a standard way. Besides, you can do lots more interesting things with a shader, like PCSS, depth difference fading etc.
Floating point textures are the only way to do it in a standard way. Besides, you can do lots more interesting things with a shader, like PCSS, depth difference fading etc.