use depth buffer and backbuffer as a texture

ChenA

Newcomer
we can use backbuffer as a texture in directx, but can't use depth buffer as a texture.
we can use depth buffer as a texutre in opengl, but can't use backbuffer as a texture.

i don't know why.
anyone can explain this?
thanks.
 
You can use the depth buffer as a texture in DirectX. In DX9 only with vendor extensions such as DF16/DF24/INTZ/RAWZ, but in DX10 it's a standard feature.
 
Also note that when you can set arbitrary render targets using the "back buffer" as a texture isn't really that important. Typically in a modern renderer you only really even touch the swap chain buffer at the very end of the frame as a target for the final, post-processed, tone-mapped scene. There may be minor memory savings to be had using it as a temporary buffer during frame rendering, but it's not usually significant enough to offset the limited formats and options available. Besides, you normally want some kind of AA and it's more flexible to create your own multisampled render targets and leave the swap chain in a simple "displayable" format.
 
Back
Top