Search Unity

Question Creating a 3D mask in URP

Discussion in 'Universal Render Pipeline' started by WoollyOne, Mar 27, 2023.

  1. WoollyOne

    WoollyOne

    Joined:
    May 16, 2022
    Posts:
    4
    I want to make a material for an object where any object with the material reveals a hidden layer.

    I have looked up solutions online, however these seem to involve a selection of objects with this ability or the other objects are required to have their own shader. I want this to be shader agnostic. Basically, I want all objects of a certain layer to be visible only when viewed through the "prism" of another object. What would be the best way to achieve this?
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,060
    Look up how the stencil buffer works (on YouTube look for stencil portals)