Contents

quadraticAttenuation

A quadratic factor applied to the attenuation of a point light or spotlight.

Declaration

var quadraticAttenuation: GLfloat { get set }

Discussion

The distance attenuation factor is calculated as 1.0 / (k0 + k1 * d + k2 * d * d), where d represents the distance from the light to the point being lit. The quadraticAttenuation property is represented in this calculation as k2. The default value is 0.0.

See Also

Configuring Lighting Attenuation