Lighting pipeline
Understand how authored light units reach the GPU and how lights are culled before you change them.
Read this page before you change light submission, light culling, or the lighting terms of material evaluation. The units and limits an application sees are specified in the lighting reference.
Units are resolved on the CPU
Byte Engine resolves authoring units on the CPU. The GPU receives RGB lux for
directional lights and RGB candela for point and cone lights. Local lights use
inverse-square attenuation, and the physically based (PBR) material evaluation
applies diffuse albedo / π and specular bidirectional reflectance distribution
function (BRDF) terms.
For a local light, the incident RGB quantity at a surface is
candela / distance², multiplied by the cone factor when applicable. For a
directional light, the incident RGB quantity is its lux value directly. Shadows
and material BRDF terms then reduce or redistribute that incident light. They
don't change the authored unit conversion.
The PBR visibility pipeline and the atmosphere sky apply the camera exposure as they write scene light, so later passes such as bloom and tone mapping receive exposed light. Scenes drawn with other pipelines ignore exposure.
Lights are culled per cluster
Every frame, the renderer splits each camera's view into a grid of clusters on the GPU and records which lights reach each cluster. Each pixel is then shaded only with the lights that can reach it, so a scene with many small lights costs about as much as the few lights near each surface. A point or cone light reaches as far as its exposed illuminance stays above 1/1024 lux, so reach grows with the light's intensity and the camera exposure. The light list holds 1,024 lights. The renderer logs a warning and leaves out the rest.
Shadow maps belong to the visibility pipeline
The visibility pipeline selects, sizes, and updates the shadow maps lights cast. Read Shadow maps before you change them.