Search Unity

Saving the result of a shadergraph in a rendertexture

Discussion in 'High Definition Render Pipeline' started by Benjamin_V, May 5, 2020.

  1. Benjamin_V

    Benjamin_V

    Joined:
    Apr 1, 2019
    Posts:
    11
    Hi,

    I would like to save the depth texture of a camera into a RenderTexture. For that, I created a shadergraph that returns the depth value. I wanted to use Graphics.Blit() to get the RT I wanted but It seems it doesn't work in HDRP with shadergraph. I had the same issue with custom render texture. What are the other solutions available for me ? I also tried to use a vertex shader but I was not able to make it work.

    Thanks for you help,

    Benjamin V.

    Edit : Ok I found a solution by using HDRP custom passes (https://docs.unity3d.com/Packages/c...s.high-definition@7.1/manual/Custom-Pass.html). It works perfectly.
     
    Last edited: May 6, 2020