Welcome to
www.tdxlibrary.org
Home of the
the TDx_Library...
"RAD DirectX"
for
C++ Builder
...
|
GLOSSARY
REFERENCE
Below you will find the glossary reference for 'Attenuation'
|
|
If you would like to submit additions or improvements to this page, click: darren_john_dwyer@hotmail.com.
ATTENUATION
[ TDx_3DI_Library ]
[ next: Back Clipping Plane ]
[ prev: Antialias ]
The effects of attenuation are considered to be of three parts, constant, linear, and quadratic attenuation, and the resulting intensity of a light over distance is calculated in the following way.
The distance between the vertex being illuminated and the light source is calculated as a proportion of the lights range (contained in the Range property of this object) using the formula distance = (range-distance)/range.
The distance value thus ranges from 1.0 at the light source to 0.0 at the light's full range.
The combined intensity factor of the light is then calculated using the formula
intensity = Attenuation0 + Attenuation1 * distance + Attenuation2 * distance^2
where Attenuation0, Attenuation1, and Attenuation2 are properties of the light in question.
The result is then multiplied by the light's color to produce the final intensity.
Various combinations of values of the three attenuation properties will create unique lights.
Negative values will achieve dark light effects similar to those when using negative values for color.
Attenuation does not affect directional type light sources.
|
|