Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

2D Shadows Shader

Discussion in 'Shaders' started by GabrielBigardi, Jan 8, 2020.

  1. GabrielBigardi

    GabrielBigardi

    Joined:
    Apr 14, 2017
    Posts:
    18
    Hello, i need to have a shadow below the sprites for a top-down game, and i've tried to use a black low-opacity sprite, and it works, but when a shadow goes above the other, it makes the other shadow darker, i dont want it, i want the shadows to merge... If you didn't understood i will post some images of what i have and what i want:

    The 2 shadows i have


    What i get when 2 shadows overlap above each other


    What i want to achieve when 2 shadows overlap above each other


    Please if someone have a shader for that, that will be pretty nice.
    Thanks !