A GPU-driven Forward+ lighting system for Unity URP, designed for mobile-first performance.
Supports up to 64 visible lights per camera with predictable GPU-based light culling.GPUDrivenForwardPlus is a GPU-driven clustered forward lighting system for Unity URP,designed specifically for scenes that require more than the default per-camera visible light budget.URP’s built-in Forward+ pipeline is optimized around a fixed per-camera visible light limit,which works well for many projects but becomes a constraint in light-dense scenes.GPUDrivenForwardPlus is built with a different design goal: enabling a single camerato reliably process up to 64 additional lights with fully deterministic GPU behavior.This is achieved by assigning lights to view-space clusters on the GPU.Each Cluster AABB is strictly limited to a maximum of 8 additional lights, ensuringthat every pixel evaluates only a small, fixed number of lights.As a result:A single camera can handle up to 64 additional lightsShading cost is strictly bounded per cluster (max 8 lights)Lighting cost becomes independent of object countLighting cost becomes independent of draw call countPerformance remains predictable and stable on mobile GPUsThe system uses a forward lighting pipeline (not deferred) and is compatible withURP Lit and SimpleLit workflows. A minimal custom Forward+ shader example is included for extension and integration.GPU-driven light culling: Light visibility and clustering are resolved on the GPU side for deterministic behavior.Single compute dispatch per frame: All light culling results are generated with one ComputeShader dispatch per camera.No interlocked operations in ComputeShader: The ComputeShader avoids atomic / interlock instructions to ensure stable performance on mobile GPUs.Forward lighting pipeline: Lighting is evaluated in a forward rendering pass (not deferred).Per-camera light budget: Each camera supports up to 64 concurrent lights.Per-cluster light budget: Each cluster AABB supports up to 8 lights by design to guarantee predictable GPU memory access.No pre-depth pass required: The pipeline does not rely on any pre-depth or depth-only pass.Alpha objects supported: Transparent (alpha) objects are included in the light culling and lighting process.Debug visualization supported: Built-in debug views for per-cluster light count and cluster heatmaps.Shader supportForwardPlusLight (URP Lit compatible)ForwardPlusSimpleLight (URP SimpleLit compatible)CustomForwardPlusLight, A minimal Custom Forward+ shader example for extension and integration.




