Why is the data you get from the GBuffer through Niagara inconsistent in how it is mapped?

Hello,

I’m trying to sample the GBuffer attributes through Niagara but I’m getting some inconsistent results based on my viewport size.

You can see below the screenshot that shows my issue. Notice all the empty space in the viewport on the bottom frame.

I am displaying the data from the GBuffer sample by writing the Depth to a Grid2D and then copying it over to a Render Target 2D. That texture is used in a post process material to see what it looks like on screen.

Hey,

You need to apply the viewport offset to your UVs.

UV = UV * View.ViewSizeAndInvSize.xy * View.BufferSizeAndInvSize.zw;

We will add a pin to do this automatically, as sometimes you want this to be applied and other times you do not.

Thanks,
Stu

That worked – Thanks for clearing that up