Sign in to follow this  
vokuhila

User clipping plane error

Recommended Posts

Hi, I want to use user clipping planes to reduce the overdraw of my point- and spot lights. The problem is that my old Radeon 9800 produces strange fragments on the visible side of the planes. The triangles which intersect with the clipping planes contain black stains. These stains come and go randomly each frame i.e. they flicker very fast. Everything behind the plane doesn't get drawn, as expected. See the screenshot below to understand what I mean ;-) Radeon 9800 I guess I can't do anything to prevent this since it's a hardware or driver thing. So my question is simply if this problem also does occur on newer devices. If not, then I could live with it because the problem is not very noticable at the hull of the pointlights. Edit: I just had a closer look at the problem with a static pointlight. I have to solve the problem in any case, because the flickering looks horrible and is very noticable. Using the stencil buffer would be slower, but it should do the trick. Thanks for reading (and hopefully answering). [Edited by - vokuhila on October 7, 2006 10:35:05 AM]

Share this post


Link to post
Share on other sites
That is a bit strange - can't say I ever saw anything like that in the years when I used a Radeon 9800. Almost looks like its clipping entire triangles where only a single vertex is past the clipping plane.

How are you setting up the clip planes? Through fixed-function or through a vertex/pixel shader?

Have you tried running your code on the Reference Rasterizer? This FAQ might be of interest.

hth
Jack

Share this post


Link to post
Share on other sites
Thanks, jollyjeffers.
Your tip was very helpful. The REF device showed the exact same problem, so it was obvious that it's not the fault of my graphics card.

So I found out that it has sth. to do with my pre z-pass. The z-buffer gets filled before the actual drawings, to reduce overdraw.
Adding a small bias to all geometry in the z-pass magically solves the problem.

I'd never thought that the clipping planes somehow depend on the z-buffer, but now I know it and it seems to work.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this