Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

2D lighting and shadows: possible to create realistic sprite shadows?

Discussion in '2D' started by AndreasLovesFiveFingerEntertainment, May 10, 2020.

  1. AndreasLovesFiveFingerEntertainment

    AndreasLovesFiveFingerEntertainment

    Joined:
    Apr 16, 2017
    Posts:
    14
    Hi,

    I'm busy implementing the 2D lighting system and the LWRP. It's really cool, but I was wondering if something is possible and if so, how to do this.

    Can you make a realistic 2D shadow like this example (it's just a mock-up):


    Because now whatever I try, the shadow only follows the box outline of the sprite.

    Thanks in advance,
    Andreas
     
  2. ed_s

    ed_s

    Unity Technologies

    Joined:
    Apr 17, 2015
    Posts:
    165
  3. AndreasLovesFiveFingerEntertainment

    AndreasLovesFiveFingerEntertainment

    Joined:
    Apr 16, 2017
    Posts:
    14
    Hi Ed_s,

    thanks for your reply. I've tried using a custom outline but nothing happens really. The only thing I found so far is a custom outline on the object with the shadow caster 2d on it. That kind of works, but it loses a lot of the detail of the (pixel) sprite.

    I was just wondering if there is a shortcut around the custom outline of the shadow caster 2d setting. Mostly because I'm really lazy and I don't want to custom outline all my shadow casting sprites ;).