Page 1 of 1

Water and Terrain scene nodes Edge problem - fix link :)

Posted: Tue Sep 12, 2006 3:12 am
by lordcool
D3D9 Rendering - Edge broken
http://hompy.ollio.com/view.asp?fnm=hompy78051.jpg

OpenGL Rendering - Good
http://hompy.ollio.com/view.asp?fnm=hompy78052.jpg

OpenGL is good but D3D9 has a problem, Edge broken!!
I wanna using D3D9. :cry:
I tried changing my Display setting, Excuting both ATI and nVidia card.
but still edge is broken, using D3D9.
my D3D9 version is 9.0c

How can i solve this? plz, help me

Posted: Tue Sep 12, 2006 10:00 am
by funcdoobiest
The problem you are having is z-fighting, simply put your z-buffer does not have enough precision to decide what needs to be drawn in front or behind correctly. Obviously to help you would want the depth buffer to be as big as possible (24 rather than 16-bit) giving you more precision. I'm not sure why you don't get this problem in OGL, as far as I know Irrlicht will first ry to create a 24-bit depth buffer before resorting to a 16-bit for DX - I don't know what it does with OpenGL.

You can play around with the near and far clipping planes as the ratio of their values effects where the precision is 'used' in your depth buffer.

For an in-depth explanation the post by LeGreg at gamedev.net is well worth a look

http://www.gamedev.net/community/forums ... =1#2591780

Posted: Tue Sep 12, 2006 10:27 am
by hybrid
DirectX in Irrlicht uses a 16bit depth buffer, this will be changed in the next release, though. You can change the source code on your own in the meantime, search for D16 and change to D24X8 in CD3D?Driver.cpp

Posted: Tue Sep 12, 2006 11:30 am
by lordcool
perfect!! thanks 4 replying. funcdoobiest, hybrid :P
cured my headache clearly now. thxthxthx