The first float (intensity) becomes attenuation (gradual loss of intensity), and the 2nd float (the last 4 bytes) is 'Range' in game units. In the ambient/directional scenario this has no meaning and no data is stored at all... (in this case the chunk is 4 bytes shorter)
[edit]
Here's the structure:
public class Light
{
LightType _type;
Color _color; // ABGR
float _attenuation;
float _range; // Not stored when _type != 2 (Omni);
.. excluded property accessors..
}
public enum LightType
{
Ambient,
Direct,
Omni
}
|