Hi, I’d like to ask for help here. I’m implementing an SSGI post process, with HDRP in deferred. I have finally everything working (at least it seems like it). But when applying the final result of the sampled global illumination (/indirect lighting) from the nearby environment, I need one last piece of the puzzle - to be able to get diffuse colors of individual objects/faces I’m trying to apply the GI on.
Right now I am only able to get color of the surfaces from the original image, which is ok in actually lit scenes. But for correct color mixing I need to know diffuse component of each surface I’m bouncing the light on, so I can light up even objects that are fully shadowed (black) without it.
I’m reading everywhere, that “_CameraGBufferTexture0” serves this purpose. But when I use this, shader complains about undeclared variable (quite reasonably). If I declare it as “sampler2D _CameraGBufferTexture0;” and then read “tex2D(_CameraGBufferTexture0, uv);” the result is always grey color. So I am guessing I am missing some key info here, maybe these names are old - used with the “CG” includes, and current HDRP when working with “HLSL” includes uses different ones, or I need to pass them myself from the postprocess .cs side?