This is the documentation for Enlighten.

class Enlighten InternalLightFalloffTable

class Enlighten::InternalLightFalloffTable

The light table stores the falloff model of a light.

The falloff of the light is stored between the m_Near and Far clip distance of the light. Up to the m_Near distance, the light is assumed to be at maximum intensity. Beyond the Far distance, the light is required to have zero intensity.

To more closely approximate common light types, the light table is accessed by an inverse squared index.

Indexing is performed with the following equation: d = Max(0, distance - near) / (far - near) index = (samples - 1) / (1 + d * d * (samples - 2))

Variables

Name Description
Geo::v128 m_InverseCutoffMinusRadius


Broadcast the inverse of the (Far - Near) distance into all the values of this vector:

1.0 / (Far - m_Near)


Geo::v128 m_Table[InputLightFalloffTable::g_SampleCount+1]


The light table samples.

Functions

Name Description
Initialise(const InputLightFalloffTable &, float, float)

this method is inline so it can be used by SPU code.

InternalLightFalloffTable(const InputLightFalloffTable &, float, float)

Constructor.


void Enlighten::InternalLightFalloffTable::Initialise


public: void Initialise
(
    const InputLightFalloffTable & table,
    float radius,
    float cutoff
)


this method is inline so it can be used by SPU code.


Enlighten::InternalLightFalloffTable::InternalLightFalloffTable


public: InternalLightFalloffTable
(
    const InputLightFalloffTable & table,
    float radius,
    float cutoff
)


Constructor.