PDA

View Full Version : clipping planes optimization for shadow mapping ?



equentric
11-28-2003, 04:40 AM
hi,

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

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

equentric
12-01-2003, 01:00 AM
hi,

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 ??!!


thanks