IDirect3DRMLight::GetLinearAttenuation
Retrieves the linear attenuation factor for a light.
D3DVALUE GetLinearAttenuation( );
Return Values
Returns the linear attenuation value.
Remarks
Lights that have a location (are not infinitely far away) can have attenuation factors to calculate the attenuation of the light based on distance from the light.
The formula for the total attenuation factor is:
1 / [constant_attenuation_factor + distance * linear_attenuation_factor + (distance**2) * quadratic_attenuation_factor]
The total attenuation factor cannot be greater than 1. When attenuation factors are not provided, the default values are 1.0 for the constant attenuation factor, 0.0 for the linear attenuation factor, and 0.0 for the quadratic attenuation factor.
See Also