Search Unity

Question Jagged Shadows

Discussion in 'Editor & General Support' started by SteveJ, Jan 17, 2023.

  1. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,085
    I have this Swipe card Writer in my game that looks like this (rendered outside Unity):
    cardwriter_model.PNG

    In game, I find that no matter what I do settings-wise, it produces these really weird jagged shadows (see on the wall behind, and "inside" over the red LED area):
    cardwriter_shadows.PNG

    I've tried tweaking every shadow setting I can find and haven't fixed this even slightly. Nothing seems to affect it. The shadow is being produced by a realtime light - no lightmap.

    I've also looked at a bunch of threads around "jagged" or rough shadows and not found any suggestions that have helped when I apply them.

    Does anyone have any thoughts/clues as to things I might be able to look into?

    NOTE: I'm seeing this on other objects here and there too - things like this where it has like indented sections and stuff like that.
     
  2. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,085
    So this is weird. I just created an empty scene, drop in a cube, put the Card Writer on top of it. Basic Point Light, turn on shadows, and it's totally fine...

    So why doesn't it work in my "real" Scenes... hmmm...

    in_empty_scene.PNG
     
  3. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,085
    And if I take the light in the room in-game, and move it closer to the table "live", the shadow cleans up more and more, the closer I get. The further away the light moves, the more jagged the shadow becomes... HMMMMM...

    close_light.PNG
     
  4. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,085