Extracting G-buffers for URP deferred shader

In 23.3, you can now get a handle to the gbuffers though the ContextContainer frameData. You can read more here .

      // UniversalResourceData contains all the texture handles used by the renderer, including the active color and depth textures
            // The active color and depth textures are the main color and depth buffers that the camera renders into
            UniversalResourceData resourceData = frameData.Get<UniversalResourceData>();

            var gbuffers = resourceData.gBuffer;
3 Likes