Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

ScriptableRenderPasses cannot consistently access the depth buffer

$
0
0
A fairly common need when writing custom render passes in URP is rendering to one or more rendertargets while ztesting against (and possibly zwriting) the actual camera depth buffer.

i.e. inside ScriptableRenderPass.OnCameraSetup:
Code (CSharp):
  1. cmd.GetTemporaryRT(someRTHandle.id, descriptor);
  2. cmd.GetTemporaryRT(anotherRTHandle.id, descriptor);
  3.  
  4. RenderTargetIdentifier[] mrt =
  5. {
  6.     someRTHandle.Identifier(),
  7.     anotherRTHandle.Identifier(),
  8. };
  9.  
  10. RenderTargetIdentifier depthTarget = ?????...
ScriptableRenderPasses cannot consistently access the depth buffer

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>