Home

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

In
the
lighting
pass,
shaders
read
the
G-buffer
data
to
evaluate
lighting
contributions
for
every
pixel,
enabling
scenes
with
many
light
sources
without
re-simulating
geometry.
This
decoupling
yields
performance
advantages
when
rendering
complex
lighting,
allows
post-processing
effects
to
access
per-pixel
geometry
data,
and
simplifies
shadow,
reflection,
and
global
illumination
techniques
in
some
pipelines.
need
for
careful
management
of
precision
and
formats.
Gbuffers
are
foundational
to
many
deferred
shading
implementations,
with
variants
existing
to
balance
fidelity,
performance,
and
hardware
support.