Versions Compared

Key

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

Additional functionality to support rectangular area lights.

Functions

NameDescription
CalcLightValueSize(PrecisionHint::Value)

Return the size of the light value given the precision hint.

CalcRectangleLightAreaNormalisation(float, float, float)

Returns an intensity normalisation factor for area lights.

CalcRectangleLightMinEdgeLength(float)

Returns a minimum edge length for rectangular lights that should minimise noise from float precision.


Anchor
aa9e96ab39411c645e2c6f8c7aceb3ca5
aa9e96ab39411c645e2c6f8c7aceb3ca5

Geo::u32 GEO_CALL Enlighten::CalcLightValueSize

...

public: Geo::u32GEO_CALL CalcLightValueSize
(
    PrecisionHint::Value precision
)

...

Return the size of the light value given the precision hint.

Parameters
[in]precision

The hint to what floating point precision to use.


Anchor
a5c533e5afb2b25e0b0f41859bba1b1b0
a5c533e5afb2b25e0b0f41859bba1b1b0

float GEO_CALL Enlighten::CalcRectangleLightAreaNormalisation

...

public: float GEO_CALL CalcRectangleLightAreaNormalisation
(
    float initialWidth,
    float initialHeight,
    float unitScale
)

...

Returns an intensity normalisation factor for area lights.

By default, the apparent brightness of rectangular lights changes with their size - larger rectangles emit more light. It can be convenient to instead adjust the brightness so that changing the lights size does not affect the brightness by normalising the light intensity. This function computes a factor that normalises to a 100x100 unit light source (1m^2 in Enlighten units).

Returns

Will return -1 for invalid input (nans, infs, and tiny unitScales) and 0 for zero area lights.

Info
titleSee Also

InputLight


Anchor
a54642cee34a20f165043edc601406494
a54642cee34a20f165043edc601406494

float GEO_CALL Enlighten::CalcRectangleLightMinEdgeLength

...

public: float GEO_CALL CalcRectangleLightMinEdgeLength
(
    float unitScale
)

...

Returns a minimum edge length for rectangular lights that should minimise noise from float precision.

The default unitScale for a scene is 1.

Returns

Will return -1 for invalid input (nans, infs, and tiny unitScales)

Info
titleSee Also

InputLight