Graphics / QUBICENGINE HANDBOOK

The complete rendering pipeline

Connect visibility, rasterization, opaque lighting, shadows, transparency, HDR, temporal reconstruction, and presentation.

A final image is built from intermediate results#

The first triangle writes one color target. A modern frame uses several passes because different questions need different data. Which surfaces are visible? What are their material properties? Which lights reach them? How can earlier samples improve the current image? QubicEngine’s reference renderer uses deferred opaque lighting, tiled light lists, forward transparency, HDR color, temporal reconstruction, bloom, and tone mapping. This is a coherent design choice, not a claim that every technique is best for every scene.

01GeometryDepth + G-buffer02LightingHDR color03TemporalHistory + motion04PresentTone-mapped image
Ownership and dependencies in QubicEngine’s documented reference architecture.

Geometry, depth, and surface properties#

Visibility selects instances and LOD. The opaque geometry pass writes depth, normals, material values, and motion vectors into defined attachments. Motion vectors describe screen-space movement from the previous transform/camera to the current one. Alpha-tested geometry discards uncovered samples but still needs consistent depth and motion behavior. Depth testing rejects hidden fragments; early testing can avoid unnecessary pixel work when pipeline/shader behavior permits it. G-buffer formats balance precision and bandwidth. Packing normals saves memory, but decoding costs arithmetic and can introduce error.

Lighting paths and shadows#

Deferred lighting reads visible surface data and applies relevant lights. Tiled or clustered light lists avoid looping over every scene light for each pixel. Forward rendering instead evaluates lighting during geometry shading. The reference transparent path uses forward shading because blended layers do not fit a simple nearest-surface G-buffer. Shadow maps record depth from lights. Cascades allocate directional-light detail near the camera; point/spot lights use suitable projections. Bias reduces self-shadowing but can detach a shadow from its caster. Filtering softens samples without making an arbitrarily low-resolution map accurate.

INTERACTIVE ILLUSTRATIONSIMULATION / BROWSER

Light meets a surface This illustration uses canvas. The explanation below describes the same process.

Change a control to inspect the result. Values describe the simulation, not native engine benchmarks. Open full lab ↗

Transparency needs an ordering policy#

Blended surfaces often need back-to-front sorting and typically do not write opaque-style depth. Sorting is approximate for intersecting surfaces. Order-independent techniques trade storage and complexity for different quality properties. Alpha test is useful for cutouts, but it produces different coverage behavior from true translucency. A transparent material’s lighting and fog must follow the same linear color convention as opaque lighting. Premultiplied and straight-alpha blending require matching shader output and blend factors. Mixing their contracts creates dark edges or overly bright layers.

HDR and temporal reconstruction#

Lighting accumulates into a floating-point HDR target. Tone mapping compresses that range into display output; exposure controls the chosen response. Bloom filters bright regions but cannot replace actual indirect illumination. Temporal antialiasing combines jittered current samples with reprojected history. Motion vectors and depth help identify matching surfaces. History rejection and clipping limit ghosting when the correspondence fails. Camera cuts and newly visible surfaces need a reset or reduced history weight. Temporal reconstruction is discussed in its own chapter.

Implementation: pass contracts

RenderGraph gives every pass declared reads, writes, formats, and resolution. A lighting pass cannot silently sample depth that was never produced. Temporal history is an imported persistent resource with a previous-frame identity, not a transient target recycled as soon as current recording ends. Each backend resolves these logical resources into native views and barriers. The DX12 path records attachment transitions and descriptor tables; Vulkan records matching layouts, stage/access dependencies, and descriptor bindings. Recording follows the graph’s dependencies rather than relying on unrelated source-file order.

Costs and troubleshooting#

Deferred targets spend bandwidth and storage. Forward paths can spend repeated lighting computation. Transparency creates overdraw. Temporal filters spend history memory and can blur detail. Shadow maps spend extra rendering and resolution. Measure pass durations and attachment bandwidth in a representative capture. A lighting-only artifact suggests material/normal/light-list data. A ghost trail suggests motion/history rejection. Shadow acne suggests bias or precision. Incorrect transparency edges suggest blend conventions. Use pass views to inspect depth, normals, motion, HDR, and final output independently before adjusting everything at once. Explore render-graph lifetimes and global illumination.

Search titles and full article text.