Gbuffers
Gbuffers, short for geometry buffers, are a collection of per-pixel data stored during a dedicated geometry pass in real-time rendering, primarily used by deferred shading pipelines. They separate the geometry stage from the lighting stage by recording scene information that lights will later use to compute shading. A G-buffer is typically implemented as multiple render targets, each storing a different per-pixel attribute. Common components include world-space or view-space position, per-pixel normals, albedo or diffuse color, and material properties such as specular color or the PBR parameters roughness, metalness, and ambient occlusion. Depth is usually stored in a separate depth buffer, but some pipelines include it in the G-buffer.
During the geometry pass, the renderer writes these values to the G-buffer as it rasterizes the scene.
Trade-offs include higher memory bandwidth and storage requirements, potential challenges with transparency and MSAA, and the