Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

DepthNormalTexture from another Camera

Discussion in 'Shaders' started by azyre, May 18, 2020.

  1. azyre

    azyre

    Joined:
    May 25, 2017
    Posts:
    4
    Is there an easy way to extract the DepthNormalTexture from a secondary Camera?
    I know it can be done with replacement shader and a second blit call but I would like to avoid an extra render.

    Possible ideas I've thought of are:
    passing the _CameraDepthNormalTexture of the under camera under another name,
    modifying the default depth-normal replacement shader,
    custom blit call to get DepthNormal + standard draw

    Can anyone tell me if those are along the right direction/point me to how this could be done?