Expand description
Packs authored RectAreaLights into the per-scene AreaLightData table the
forward pass reads alongside the GpuLight buffer.
The GpuLight record carries the panel’s centre (position), emitting
direction (direction), colour, intensity, and range; only the two in-plane
edge vectors and the sidedness flag need the parallel table, indexed by
GpuLight.data_index. The edge vectors are pre-scaled by the half-extents, so
the shader reconstructs the four corners as centre +/- right +/- up without
needing the sizes separately.
The tangent frame comes from geometry::glass_quad::plane_basis, shared with
the glass-panel quad builder, so a panel and an area light with the same
normal agree on which way is “across”.