Shadow Maps With Checkerboard?

Started by
7 comments, last by terrence321 17 years, 12 months ago
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
Advertisement
which kind of shadow map implementation is this? Is it plain shadow maps? How do you soften the penumbra?
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
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.
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.
I got problems like these, when rendering depth to a 32-bit float rendertarget while the screen (accidentally) used 16-bits color and depth.
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.
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
Yeah zedzeek I'm guessing that's the case. This checker pattern was TOO perfect to be any sort of anomoly from my algorithm.

This topic is closed to new replies.

Advertisement