Yes absolutely.
As Nicholas suggested you can do several passes by clearing and re-adjusting each time your depth buffer.
It just only works if you can indeed "cut" your world into distincts layers that can be superposed to produce
the final image. Otherwhise Z values would mismatch between layers and result would be bugged.
Igor.
----- Original Message -----
From: Brano Kemen
To: gdalgorithms-***@lists.sourceforge.net
Sent: Wednesday, July 16, 2003 11:49 AM
Subject: Re: [Algorithms] Dynamic near/far clipping planes
Is it reasonable to render one part of terrain, say from 10km to 50km,
then clear the depth buffer and render another part with farplane at
10km? The second part would be always in front of the first one.
I can have visibility more than 50km, and I'm having z-fighting
problems, as can be seen on the screenshots (that z-island in the water
plane)
http://manabove.org/terrain/images/v2/47-8m.jpg
http://manabove.org/terrain/images/v2/46-2.jpg
http://manabove.org/terrain/images/v2/46-1.jpg
Can anyone suggest what can be done about it, without significantly
loosing performance?
Brano Kemen
Post by Igor KravtchenkoIn other words, you would want to change dynamically your znear/zfar to
adjust z precision ?
In such case, the answer is no. The problem is that only revelant to the
API you are using, so
some people could think it's already off-topic. Indeed such API like D3D
"scales" the precision
of the ZBuffer depending of the range of your znear/zfar and the 3D card
capability (old voodoo
cards used for instance an internal float16 for their WBuffer and a 32
bits integer where only
hiword was stored for their ZBuffer).
To be short : you cannot rely on modifying dynamically znear/zfar while rendering to solve
z-fighting problem.
Igor.
----- Original Message -----
*Sent:* Wednesday, July 16, 2003 10:17 AM
*Subject:* [Algorithms] Dynamic near/far clipping planes
Is it possible to keep changing the near/far clipping plane to keep z buffer
precision where you currently need it. For example say you have a large
terrain and a bit of water with z fighting problems at the edges. Is it
possible to draw the bit of terrain in the distance with distant near/far
clipping planes and then draw the close section with water with closer
near/far clipping planes? Does this technique have a name which may help me
find papers etc on this technique?
-Ryan De Boer
-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
GDAlgorithms-list mailing list
GDAlgorithms-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_id=6188