Search Unity

Beginner problem: Wrong casting of dynamic shadow with Deffered Rendering?

Discussion in 'Editor & General Support' started by Sharlatan, Aug 20, 2013.

  1. Sharlatan

    Sharlatan

    Joined:
    Jul 23, 2013
    Posts:
    111
    Hello everybody!

    I'm quiet new to Unity and it could well be that it's my fault for not understanding something correctly. But here's what's troubling me:
    I'm working on a sandbox room and am in the process of doing some slopes to test sliding. I enabled dynamic shadows to give the player better visual clues about how the room is constructed (it can be hard to judge distances and the likes if you only have big walls with only one color on them).
    First I used forward rendering and a directional light which worked very well, like show here:
    $directional_lightning_forward_rendering.png

    But the room got a ceiling and thus a directional light didn't work anymore. So, I switched to deferred rendering and first tried to use a spot light. It somehow worked but I the shadows are not as I expected them to be. As you can see, the slope casts a shadow but there are parts where no shadow is drawn but it (in my opinion should be): Near where the wall/floor connect to the under side of the slope. You can even see a "gap" in the shadow and then another small stripe of shadow:
    $point_lightning_deffered_rendering_error.png

    The problem is even more obvious when using a spot light. Only a small part of the shadow under the slope is being drawn:
    $spot_lightning_deffered_rendering_error.png

    Does anyone have an idea what's causing this?

    Thanks a lot for helping a newbie out!

    Greetings,
    Sharlatan

    Edit Additional information: I have this problem with both types of shadows, soft and hard.f Also, the problem seems to only appear for objects near a floor/wall.
     
    Last edited: Aug 20, 2013