Filling the G-Buffer
A geometry buffer or G-Buffer is a collection of one or more textures that contain attributes of the current frame necessary to render the final scene at a later stage, usually within screen space. The attributes stored in the G-Buffer might consist of data, such as position, normal vectors, diffuse, and other material properties.
This recipe prepares a G-Buffer that collects the information needed for a classic deferred rendering technique (or deferred shading); however, the approach can be easily extended to cache information for any deferred technique.
Getting ready
We will need a scene with a number of objects and varying materials. We will use the MeshRenderer class and vertex structure from the Adding surface detail with ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access