Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Depth masking with HDRP?

Discussion in 'Graphics Experimental Previews' started by Ehredt, Jul 8, 2019.

  1. Ehredt

    Ehredt

    Joined:
    Jun 20, 2018
    Posts:
    79
    I'm interested in making a visible "hole" in a rendered mesh using an invisible object, as referenced in the following legacy pipeline examples.

    https://answers.unity.com/questions/316064/can-i-obscure-an-object-using-an-invisible-object.html
    http://wiki.unity3d.com/index.php?title=DepthMask

    However, this approach uses the render queue, and as best I can tell, this won't work with the HDRP as it doesn't expose the render queue -- it seems the closest thing I'd be able to use would be Sorting Priority, which only applies to transparent materials.

    https://github.com/Unity-Technologies/ScriptableRenderPipeline/wiki/Material-Priority

    Am I off base, or is this impossible using the HDRP? Is there a better way to do this? I have very little experience writing shaders, so it might be that I'm just in over my head.
     
  2. Sheynes

    Sheynes

    Joined:
    Mar 27, 2017
    Posts:
    66
    Ehredt likes this.
  3. Ehredt

    Ehredt

    Joined:
    Jun 20, 2018
    Posts:
    79
    Excellent, thanks so much!