Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

URP 2D Lighting ignores camera Z rotation?

Discussion in '2D Experimental Preview' started by Arkade, Jul 29, 2020.

  1. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    654
    Hi
    After adding 2D lighting to prototype I'm working on, I noticed something I assume is a bug but maybe I missed some step?
    Normal map based lighting seems to ignore camera Z rotation.

    Here's a scene with 2 sprites with normals (I've attached their textures). The camera has no rotation.
    URP-Lighting2D-Camera-RotZ=0=GOOD.png

    When the camera is rotated, the light appears to stay in the same orientation (or you could say the normals are not rotating?).
    URP-Lighting2D-Camera-RotZ=180=BAD.png

    I've attached the light settings too.
    If I'm doing something dumb or missed some instruction for what I need to do to get this working, could you please let me know. Otherwise shall I report as a bug?
    Thanks!
     

    Attached Files:

  2. dmitriyl

    dmitriyl

    Joined:
    Oct 14, 2015
    Posts:
    5
    Similar issues, just finished URP setup by tutorials...
    2) shadows ignore object rotation (compare shadows direction on both gray ships)
    upload_2020-9-16_15-55-22.png
     
    Last edited: Sep 16, 2020
  3. Chris_Chu

    Chris_Chu

    Unity Technologies

    Joined:
    Apr 19, 2018
    Posts:
    257
    Thanks for reporting this.

    This is a known bug with point lights. If you are not using your light like a spotlight I would suggest trying to use a parametric light instead.
     
  4. Lughinu

    Lughinu

    Joined:
    Nov 3, 2016
    Posts:
    11
    any progress on that?
     
  5. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    Same issue with scale. Sprite shape also ignores its shape and tangent when rendering normals into buffer...