Sign in to follow this  
terrence321

Shadow Maps With Checkerboard?

Recommended Posts

terrence321    122
I've been agonizing over this one a while, so I thought I'd post here to see if anyone else has seen this problem before. A picture would really explain it better than anything, so here are a couple: http://www.geocities.com/terrence321/ShadowMap1.jpg http://www.geocities.com/terrence321/ShadowMap2.jpg As you can see there are checkerboards in some of the trickier shadowed areas, and the weird thing is the checkerboard size is irrespective of distance to them! It's like there is a screen-aligned checkerboard of a fixed size, and there are "holes" on my models surface where I can see it. I've never had a problem like this before, and this one solitary problem is what's keeping my shadow mapping implementation from finally working. Any help is appreciated- please let me know if you can identify this problem. Thanks, Terrence

Share this post


Link to post
Share on other sites
wolf    852
which kind of shadow map implementation is this? Is it plain shadow maps? How do you soften the penumbra?

Share this post


Link to post
Share on other sites
terrence321    122
It's plain-old shadow maps. I render the depth values from the light to a FBO, and then compare those values to pixels in a shader when I render the scene. The reason the shadows look a little soft is I perform 3x3 PCF on them. However, this exact problem occurs even if I don't do PCF.

Let me know if you have any more questions.

Terrence

Share this post


Link to post
Share on other sites
terrence321    122
Also I should clarify that the checkerboard texture actually moves as my camera changes angles. Also I am using biasing, but even without that the checkerboard pattern is visible. Where on earth would that checkerboard even come from? I'm completely stumped.

Share this post


Link to post
Share on other sites
Ysaneya    1383
I had a problem like that some months ago, and that was caused by a driver bug (on an ATI card). Happened in very specific conditions.. it's been fixed in the latest drivers since, so if you haven't got those, that'd be the first thing to try.

Y.

Share this post


Link to post
Share on other sites
terrence321    122
Ok, thanks for sharing that information. But I did find out the error, and it was rather stupid. In some cases in my engine I was binding the shadow mapping shader (and thus the render target) while I was rendering to that target! OpenGL doesn't like that apparently.. imagine that.

So while it could be driver issues in some cases (that's what I thought for a while), it turns out there was a much simpler solution in this case.

Share this post


Link to post
Share on other sites
zedzeek    529
so do ati implement a checker pattern when somethings stuffed up?
shit thats what i do as well (ie i use it if the intended texture is missing/corrupt etc) im gonna have to change that then

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