HDRP Scene Color Black in Fullscreen shaders

I wanted to try making a “damage warning” vignette for the player as it seems like a simple starting point for a fullscreen effect, however, In order to do this, I obviously need to draw the entire screen and simply “overlay” my effect on top.

To make it easy to add such effects in reaction to gameplay and my environment I opted for a custom post processing effect that I could then toggle using the volume system in HDRP.

Thus, I decided to start exploring.

In prior tutorials, I was able to create distortion effects by this method when the shader is on an object in the world:

Essentially, sampling the camera’s scene color and adding an offset that was moving, to the camera. (The example came from a water shader I made by following other instruction)

Since it seemed like the right place to start, I did the following with my hdrp full screen post process shader graph:

By all logic that I am aware of, this should be simply outputting the contents of the screen normally. I started by injecting the effect after post processing, but the screen was entirely black so I started moving it around.

The screen is entirely black regardless of where it is injected.

I am just using the normal unity HDRP. Is this a bug? All my research has been murky on this topic.

If this is not a bug, Is there a proper way one should be sampling the render buffer of the camera in a fullscreen post process shader?

If anyone else finds this from searching, you will want to use the hd sample buffer set to post process input to get the color buffer instead of the HD scene color node.

You can find this in the HRDP samples. which I forgot about until hours after posting this question.

1 Like

Using the HD Sample Buffer still results in it being black for me.

Same. HDSampleBuffer renders black too :confused:

Unity 6, HD Sample Buffer and HD Color nodes both black for me.

I’m having the same problem. I’m trying to add a custom pass with HD Scene Color to get a blurred version of the scene as backdrop for my menus.

But I’m already having problems with the custom pass before even applying the material.
I create a Custom Pass Volume, then I click on the little + and add a Custom Pass. Then It looks like this:

I also immediately see these error messages:

When I now add the material I either get a black or white screen. Sometimes the blurred image is there right when starting for a couple of frames (maybe just 1?) and then goes to white or black.

Can someone share some light on this please?

Enabling “Exposure” on the HD Scene Color node as well as setting the Target Depth Buffer to None made it work, but I’m not sure if this is just a workaround or supposed to be like this?