• Popular Now

• 10
• 10
• 12
• 12
• 14

This topic is 4275 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

I'm trying to add shadow mapping to my game. To get a higher resolution shadow map, I started using a frame buffer object. But since I did that, I get strange results; the shadows projected to the floor, stays there even when the car goes away and clears only every 1 or 2 seconds. This doesn't happen if the car is on top of a ramp, for example. Its very weird... any ideas why this happens? Here a sceenshot (without textures)
  //---------blablabla

glClear (GL_DEPTH_BUFFER_BIT);

glBindFramebufferEXT (GL_FRAMEBUFFER_EXT, 0);
//---------blablabla



Share on other sites
try sticking a glDepthMask(1) before the clear

Share on other sites
Try

glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

and if not you may need to include more code...

Share on other sites
the only thing that helps is drawing a big quad facing down under the scene.
dont understand why.