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

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
lordcool
Posts: 15
Joined: Thu Jul 13, 2006 8:33 am

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

Post 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
funcdoobiest
Posts: 48
Joined: Thu Jun 15, 2006 6:35 pm

Post 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
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post 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
lordcool
Posts: 15
Joined: Thu Jul 13, 2006 8:33 am

Post by lordcool »

perfect!! thanks 4 replying. funcdoobiest, hybrid :P
cured my headache clearly now. thxthxthx
Post Reply