Thanks for taking a look. This is my first post.
Is there a way to write out the per-camera depth to a Render Texture in HDRP or URP ?
If it was a legacy pipeline, I would have written out the _CameraDepthTexture to the render target like this from a #C script through a shader.
{
Graphics.Blit(source, dest, _material);
}
Alternatively,I could use a CommundBuffer to write out the texture at the appropriate stage.
However, for HDRP or URP, I think there is a no way to get the depth for each camera, because of the graphics pipeline specification.
I imagine this is because the way to get the DepthBuffer depends on the post-effects, so we can only get the DepthBuffer of the final rendered result.
I’ve been investigating for about a week and have come to this conclusion.
However, if there is some other way, please let me know.
Thanks!