sum of all ambient lights, vec3
colour × intensity, vec3 per light
direction each directional light shines in, vec3 per light
colour × intensity, vec3 per light
position of each point light, vec3 per light
cutoff distance per light, 0 for none, float per light
The lights of a frame, flattened into the arrays the built-in light uniforms are uploaded from. Everything is in view space, so a shader can combine it with the
vPositionandvNormalthe built-in vertex shader produces, and every colour is premultiplied by the light's intensity.Directional lights are given by the direction they shine in (the node's -Z axis), so the vector towards the light,
Lin the lighting equations, is its negation.