View Full Version : clipping planes optimization for shadow mapping ?

11-28-2003, 04:40 AM

could someone give me a sample code or at leat an idea to accurate my near and far clipping plane.

I'm working on a standard shadow mapping method. And I'd like these planes to come close to nearest and farest objects.
To improve my Zbuffer's precision.

I've heard about reading again the zbuffer at frame-1 ?! Is that very accurate ?!! What do you think about it ?!!

What else could I do ??!!

thanks everybody for your help.

Emmanuel Quentric

11-29-2003, 02:55 AM
i also ran into this problem. The only solution i could find was to use
which unfortunately is supported only by nvidia.
Hopefully Ati will include such an extension too...

12-01-2003, 01:00 AM

thanks penetrator for your help.
Your idea seems interesting.
I've read explanations about depth_clamp.

It disables far and near clip planes, which fits my problem.
But it interpolates the zbuffer between the clipping planes values, and does a clamping if necessary.

I don't need to interpolate the zbuffer, but I would like to keep the closest and farthest Z values as clipping planes.

Is there a "secret" value such as 0 for far and clip plane to prevent from interpolating the Zbuffer ? How to keep the closest and farthest Z as clipping planes ??!!