Skip to main content
GameDev.net gamedev.net
🔒 Locked

Shadow Mapping Wobble

Started by Allan Robertson May 20, 2013 at 4:06 PM 4 replies 2.2k views
Original Post
Allan Robertson
Allan Robertson
Ive been researching omnidirectional shadow mapping and have been stuck on this problem for a while. Basically the shadows seem to wobble as the camera is moved or rotated. I made a video here:

">


The problem is most visible about half way through on the gravestones at the bottom of the screen.

The project is implemented in a deferred renderer and at first i thought the problem was to do with aligning texels to pixels but i read that since directx 10 (which i'm using) this is no longer a problem. Someone also suggested that i was updating the camera after the render call so it was a frame behind but this is not the problem.

Any help would be greatly appreciated.

I didn't want to start by posting massive amounts of code. If there is anything needed i can post it.
deftware
deftware

looks very much like z-fighting of some sort.

[ deftware.org ]
ginkgo
ginkgo

That looks as if the time at which you render the frame doesn't coincide with the time you render the shadow map.

Did you render the shadow map in a previous frame or update the camera settings between sm and frame rendering?

Allan Robertson
Allan Robertson

Thanks for your reply ginkgo, the order things happen in is:

camera updates > create geometry buffer > draw shadow maps > draw lights > combine

Iv'e just double checked, the camera is definitely only updated once before any rendering code starts.

MJP
MJP

The temporal aliasing that you get with directional lights occurs because you basically have to move your projection along with the camera, so that it can cover the are that's visible to the camera. Point lights and spot lights are localized, so typically you don't have to change the projection used for rendering the shadows unless the light itself moves. Does your point light stay in the same position in your video, or is it moving?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.