Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

NameDescription
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


Anchor
a387a9be9ea0c2793993a3139619dbacc
a387a9be9ea0c2793993a3139619dbacc

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.


Anchor
a120dfc5e42454fa4bb9585fe3d781543
a120dfc5e42454fa4bb9585fe3d781543

Enlighten::InternalLightFalloffTable::InternalLightFalloffTable

...

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

...

Constructor.