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. Dismiss Notice

Fading depth mask

Discussion in 'General Graphics' started by magglemitch, Dec 6, 2018.

  1. magglemitch

    magglemitch

    Joined:
    Dec 8, 2013
    Posts:
    106
    Working with AR, I use a lot of depth masks to hide and blend the digital assets with the camera view. I'm wanting to somehow have a play area and the further the gameobject is from that area, the more faded it is. I pretty much had this effect going with a shader I found, but it was limited to the world position or camera position, while I need it linked to a somewhat dynamic local transform. I wouldn't have a clue where to start with shader coding so definitely a noob there.


    I suppose there's no easy way anyone knows of to mask 3D objects? Essentially I'm just after the 2D UI faded mask asset but with 3D models.
     
    ThatMunk likes this.
  2. ThatMunk

    ThatMunk

    Joined:
    May 17, 2017
    Posts:
    12
    +1

    I need something like a fading effect instead of a sharp - like a gradient - Maybe there's some way to write the "masking" to a texture and hten use the alpha channel to decide how much is left through - idk.