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

How to highlight sprites that are rendered under other sprites?

Discussion in '2D' started by darrenunity, Dec 20, 2019.

  1. darrenunity

    darrenunity

    Joined:
    Apr 7, 2017
    Posts:
    2
    Let's say you have a pile of trash, and you want to be able to "see" certain items highlighted under that pile like this

    Then, let's say you move some of the items out the way, you still want the non-visible parts to be highlighted red


    Anyone got any ideas how you'd go about implementing this?

    I'm trying to figure out some way to highlight/draw attention to specific trash items that can be hidden under piles of other items.

    If anyone has any more straight forward ideas i'd love to hear about it.
     
  2. doarp

    doarp

    Joined:
    Sep 24, 2019
    Posts:
    147
    There are plenty of ways to do this:
    In URP you have custom renderers:
    https://m.youtube.com/watch?v=szsWx9IQVDI

    i
    n LWRP you have the LUX LWRP essentials asset in the asset store that does this.
    I’m sure there are plenty of built in renderer shaders that can do this.