Search Unity

Question How to replicate the following animal crossing effect?

Discussion in 'Shader Graph' started by DarkenedShade, Feb 8, 2021.

  1. DarkenedShade

    DarkenedShade

    Joined:
    Sep 15, 2015
    Posts:
    1
    Idea/Requirement: So I was thinking of spawning characters behind a door/arch way that is visible to the camera and wanted them to fade in as they walked through the door/arch way.

    Screenshot 2021-02-05 104214.png

    First Impressions: It looks like its a depth based shader on a single quad. Any help or tips in the right direction would be super helpful

    It can be seen clearly from 10:12 - 10:16 in the following video
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    I mean, that's kind of it. It's a depth based effect. Get the distance from a transparent plane to the scene depth behind it, and use that to adjust the opacity of an otherwise black rectangle. They're using either a texture or a bit of extra math to change the curve of how fast it goes dark. There are countless tutorials on how to do depth intersection shaders, which are used to do things like glowing edges or water foam when one mesh intersects with another. This is that same effect, just making the intersection transparent instead of brighter.