i have switched my shadow map implementation from pbuffer to framebuffer object. It basically works(shadows look the same as they did with the pbuffer most of the time).
But at random intervals(every 30 seconds on average) the shadows are not visible for a few frames(the areas are fully lit), then they are visible again, but i can't figure out why
For the shadowmap impementation, i used basically the example from the FBO spec(render directly to depth texture with no color buffer bound). Then i sample that depth texture in my fragment program with:
"!!ARBfp1.0 OPTION ARB_fragment_program_shadow; "
"TEX shadow, tex0, texture, SHADOW2D; "
What i checked already:
- I logged the matrix used to generate the shadow map, it does not change while blinking.
- I wrote a small shader to render the shadow map, there the blinking occurs as well.
- The code has glGetError() in many places, none of them reports an error. The FBO is reported to be complete.
- Happens on ATI X800 as well as on Nvidia 8800(with various drivers), so i don't think it is a driver bug.
-The application is singlethreaded with one context only, so no race conditions.
The blinking seems to occur more often in debug mode(when the glgetErrors are active and the framerate is low), but also in release mode(faster but no errorchecks). The duration of the shadow disapperance seems not to depend on the framerate.
Anyone got an idea what might be the cause of this weird behaviour?