Quote:Original post by zedz
clear depoth
#A
glDepthRange(0,0.5);
#B
glDepthRange(0.5,1.0);
voila, no speedloss, what u are doing with Z/W will in fact result in a speed loss
>>there are problems at the boundaries
perhaps, but take your example 0.1m->300km.
now on earth u cant see anything 300km away typically due to curvature + haze, in the above picture of yours the furtherest mountain is ~10km
thus in such a scenario
A/ 0.1->20km // stuff on ground
B/ 10m->1000km // stuff in air
Of course I have been using the depth range partitioning. But I was trying to say that it is slower when I have to do all the management. On the terrain I can see mountains as far as 150km (even more so now because the haze is unrealistically thin), so I have terrain tiles covering that whole range. I had to split the range 3 times for that, and could not use just the quadtree level to determine what tiles go where because the error metric would occasionally determine that a more distant tile but with larger features requires a refine, resulting in z-buffer artifacts because of the overlapping depth ranges. Then there's splitting the in-air objects, etc etc
All in all, using the logarithmic depth buffer showed to be much easier and elegant for me and others doing planetary rendering, even though it's not without problems.