Versions Compared

Key

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

class Enlighten::InputLightFalloffTable

Class encapsulating the description of a light falloff curve.

The Input Light Falloff Table stores the falloff model used by a pointlight or spotlight. The falloff of the light is represented between the m_Radius and m_CutOff distance stored in an InputLight.

Up to m_Radius distance, the light falloff is required to have a value of 1.0. Beyond m_CutOff distance, the light falloff is required to have a value of 0.0.

Indexing is performed with the following equation:

d = Max(0, distance - m_Radius) / (m_CutOff - m_Radius) index = (g_SampleCount - 1) / (1 + d * d * (g_SampleCount - 2))

Variables

NameDescription
const Geo::s32 g_SampleCount = 16

The number of samples stored in this table.

const float g_TableSampleIndices[g_SampleCount]

g_TableSampleIndices stores a set of indices that can be used to generate a LightTable.

float m_Table[g_SampleCount]

m_Table Stores the input light falloff table samples.

Functions

NameDescription
InputLightFalloffTable()

Default constructor. The table values are set to a simple default inverse squared falloff.


Anchor
a80035065fac7ddf4602fdb7d50189c31
a80035065fac7ddf4602fdb7d50189c31

Enlighten::InputLightFalloffTable::InputLightFalloffTable

...

public: InputLightFalloffTable()

...

Default constructor. The table values are set to a simple default inverse squared falloff.