VBGamer |
|||||||||||||||||||||||||||
RE: How do you make a W-Buffer? *NT* Adam Hoult (1 reply, 0 views) (2000-Aug-30) It's fairly easy, just create your ZBuffer as normal,
and then instead of using
g_d3dDevice.SetRenderState D3DRENDERSTATE_ZENABLE, D3DZB_TRUE
use
g_d3dDevice.SetRenderState D3DRENDERSTATE_ZENABLE, D3DZB_USEW
But make sure you check the caps to see if a W Buffer is supported first (you also have to be careful to setup a "W" friendly projection matrix, otherwise you may get strange effects when using Fog etc...)
hth
Adam
|