UnityRef is currently in early development. Some features may be incomplete and/or not functioning.

UNITYREF

Your Pit Stop For Solving ANYTHING in Unity

graphics

[HDRP] Fix Black Output in Fullscreen Shader Graphs

Solution

graphicsshadersrenderingpost-processingHDRP

Unity 2021.3.x - Unity 6.3.x

Published 10 days ago

Issue

 When creating a custom fullscreen post-processing effect in HDRP, using the HD Scene Color node results in a black output. This occurs because HD Scene Color provides access to the raw scene color before post-processing, which is frequently unavailable or returns null data at the specific injection point of your shader graph in the post-processing stack.

To fix black frames in HDRP fullscreen effects, replace HD Scene Color with the HD Sample Buffer node configured to Post Process Input.

Explanation

To resolve a black screen when sampling the camera color buffer in your shader graph, integrate the HD Sample Buffer node.

  1. Open your shader graph and locate the HD Scene Color node.
  2. Delete the HD Scene Color node as it is designed for transparent object logic rather than fullscreen effects.
  3. Create a new HD Sample Buffer node.
  4. In the Graph Inspector, set the Buffer property of the HD Sample Buffer to Post Process Input to capture the current frame buffer.
  5. Connect the output of the HD Sample Buffer to your effect logic.
  6. In the Volume component, ensure the Injection Point is set to After Post Process if the effect must appear over all other scene elements.

Additional Tips

  • Verify that Opaque Objects and Transparent Objects are enabled in the HDRP Default Settings if the buffer still appears empty.
  • Ensure the Custom Post Process effect is correctly added to the Volume Profile in your scene.

Related Posts Haven't quite found a solution to your problem? We think these posts might help you.

Content inspired by a Unity discussion post.