Search Unity

Bug _LastCameraDepthTexture doesn't work anymore with URP ?

Discussion in 'Universal Render Pipeline' started by relativegames, Oct 22, 2021.

  1. relativegames

    relativegames

    Joined:
    Nov 22, 2013
    Posts:
    32
    So it seems _CameraDepthTexture doesn't work anymore like the builtin pipeline where it was the last depth texture generated. In URP this is just the current camera's depth texture, if I want a previous depth texture I guess I would need to use_LastCameraDepthTexture but this is set up as "Unity Default 2D" so it seems like URP doesn't setup this texture, so I have no way to get the previous camera's depth texture :|. Is this a bug or an oversight of URP ?
     
  2. relativegames

    relativegames

    Joined:
    Nov 22, 2013
    Posts:
    32
    I found out about Texture2D.CreateExternalTexture but the textureformat is incompatible with the depth format of the RenderTexture, bummer :|.