float QuadraticAttenuation { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The QuadraticAttenuation property represents the quadratic term in the light attenuation formula for a SceneLight object. This property is used to determine how the intensity of the light diminishes over distance. The quadratic term is part of the attenuation equation, which typically takes the form:

attenuation = 1.0 / (constant + linear * distance + quadratic * distance^2)

In this equation, the QuadraticAttenuation property affects how quickly the light intensity falls off as the distance from the light source increases. A higher value results in a faster falloff, meaning the light will appear dimmer at a distance.

Usage

To use the QuadraticAttenuation property, you can set it to a float value that represents the desired quadratic attenuation factor for your light source. This is typically done when configuring a SceneLight object in your scene.

Example usage:

SceneLight myLight = new SceneLight();
myLight.QuadraticAttenuation = 0.5f;

In this example, the quadratic attenuation factor is set to 0.5, which will affect how the light's intensity decreases with distance.

Example

SceneLight myLight = new SceneLight();
myLight.QuadraticAttenuation = 0.5f;