Contents

quality

The shadow-filtering algorithm this light uses.

Declaration

var quality: SpotLightComponent.Shadow.QualityMode { get set }

Discussion

Set to medium or high to opt the light into soft shadows, whose penumbra widens with lightSize and with the distance between the caster and the receiving surface. The default value is low, which produces a hard-edged shadow whose appearance is independent of lightSize.

Higher quality modes use more samples per shadow, which increases GPU work. Excessive use of higher shadow quality lights may contribute to user-noticeable frame drops and can cause the device to heat up in graphically demanding scenes. Monitor the thermal state to lower quality as a mitigation, if necessary. Apps can monitor thermal state changes by subscribing to the thermalStateDidChange notification.

To stay responsive to the device’s available thermal headroom, read ProcessInfo.processInfo.thermalState and observe ProcessInfo.thermalStateDidChangeNotification to react when it changes. As the reported state moves from .fair toward .serious and .critical switch the light to a lower quality.

See Also

Configuring shadow quality