Forward+ Rendering for glTF Scenes with Dynamic Lights

Forward+ rendering, also known as tiled forward shading, has emerged as the premier pipeline for rendering complex glTF scenes illuminated by dozens of dynamic lights. Traditional forward rendering scales poorly with numerous light sources, while deferred shading struggles with transparency, memory bandwidth, and the diverse material models common in the glTF 2.0 specification. Forward+ rendering circumvents these bottlenecks by decoupling light culling from surface shading, providing a high-performance balance that retains the material flexibility of a forward pipeline while handling dynamic lighting efficiently.

The Limitations of Traditional Pipelines

To understand the popularity of Forward+ with glTF assets, it is necessary to examine why conventional architectures falter under modern scene requirements:

  • Traditional Forward Rendering: Standard forward rendering evaluates every active light against every rendered primitive, resulting in a computational complexity of \(O(\text{geometry} \times \text{lights})\). When a scene contains dozens of point or spot lights, fragment shaders quickly become bound by instruction count, severely degrading frame rates.
  • Deferred Rendering: Deferred pipelines solve lighting complexity by rendering geometric attributes (depth, normals, albedo) into intermediate textures known as the G-buffer, evaluating lighting in screen space with \(O(\text{pixels} + \text{lights})\) complexity. However, deferred shading requires massive memory bandwidth, cannot natively handle hardware Multi-Sample Anti-Aliasing (MSAA), and fundamentally fails to support semi-transparent surfaces—requiring an auxiliary forward pass for alpha-blended objects.

How Forward+ Solves the Dynamic Lighting Problem

Forward+ preserves the single-pass, geometry-forward structure while introducing a light culling compute pre-pass:

  1. Depth Pre-pass: The scene’s depth is written to a depth buffer, capturing the minimum and maximum depth values across the viewport.
  2. Tiled Light Culling: The screen is divided into a grid of tiles (typically 16x16 pixels). A compute shader calculates a bounding frustum for each tile based on the min/max depth bounds and tests all dynamic lights against these frustums. Lights that do not intersect a tile are discarded.
  3. Light List Generation: For each tile, an indexed list of intersecting light sources is constructed and stored in a shared buffer.
  4. Forward Shading Pass: Geometry is drawn in a standard forward pass. Instead of iterating through all scene lights, each fragment queries its corresponding screen-space tile and computes lighting exclusively for the relevant local lights.

This approach restricts lighting calculations strictly to areas where surfaces and light influence volumes intersect, reducing overhead from dozens of global lights to just a few per pixel.

Why glTF Scenes Benefit Uniquely from Forward+

The glTF 2.0 file format is the standard for 3D asset delivery on the web and across real-time applications. Its features heavily align with the strengths of Forward+:

  • PBR Extensions and Complex Shading Models: glTF features rich Physically Based Rendering (PBR) extensions, such as KHR_materials_clearcoat, KHR_materials_sheen, KHR_materials_transmission, and KHR_materials_specular. Packing all the parameters required by these varied material models into a deferred G-buffer is impractical due to memory bandwidth limits. Forward+ computes shading directly on the fragment, allowing unique, per-material shader branches and extensions without G-buffer bloat.
  • Alpha Blending and Transparency: glTF models frequently use alpha blending for foliage, glass, cloth, and particle effects. Because deferred renderers cannot store overlapping surface layers in a single G-buffer pixel, they must shade transparent items in a separate, inefficient forward pass. Forward+ handles both opaque and transparent surfaces natively within the same culled-light paradigm.
  • Targeting Constrained Hardware: glTF is widely deployed via WebGL and WebGPU in browsers and on mobile devices. Forward+ eliminates the heavy multi-render-target (MRT) memory requirements of deferred shading, keeping the memory footprint low and thermal output stable while maintaining high-fidelity dynamic illumination.

By combining the light-scaling efficiency of deferred pipelines with the material versatility and low memory overhead of forward pipelines, Forward+ provides the ideal architecture for rendering dynamically lit, feature-rich glTF assets.