Use Depth buffer as texture

Started by
1 comment, last by Hodgman 10 years, 1 month ago

Is it possible to set depth buffer as the texture to effect (LPDIRECT3DEFFECT9) in direct3d?

thanks.

Advertisement

Yes, no, and it depends on why you want to do it.

If for shadow mapping, then it can be done (on certain hardware), but you need to create a new texture with a depth/stencil format, get surface level 0 on it, set that as your depth/stencil surface and draw into it. All summarized here: http://aras-p.info/texts/D3D9GPUHacks.html#shadowmap

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

The INTZ method on the same page works for general purpose usage (e.g. Deferred rendering, post processing), but requires the user to have a D3D10-capable GPU (or very late D3D9-era)

This topic is closed to new replies.

Advertisement