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

Fade foreground / Hole shader

Discussion in 'Shaders' started by vecima, Mar 24, 2020.

  1. vecima

    vecima

    Joined:
    Jun 6, 2017
    Posts:
    16
    I'm pretty new to shaders and the shader graph, but from what I can tell most of the examples of shaders that aren't specific to shader graph don't really apply when creating shaders that way. I found the below which does pretty much everything I need, but it doesn't indicate how to go about it in shader graph.

    Can something like this be implemented in the Shader Graph?

    https://gamedev.stackexchange.com/questions/152824/how-can-i-create-a-see-behind-walls-effect
     
  2. vecima

    vecima

    Joined:
    Jun 6, 2017
    Posts:
    16
    Since my game is 2D, and I really just need to "carve a hole" in a Tilemap, it turns out that using a Sprite Mask component fulfils my needs completely. I'm still somewhat interested in the topic, but have moved on with the mask approach. I'm not sure why I didn't know about that component, but I wish I had discovered it sooner ;)