module Colours

This is the documentation for Enlighten.

module Colours

Classes

Name

Description

Name

Description

Geo::GeoFloat3SE

 

Geo::GeoFloatAsBits

Allow safe conversion between a float and its representative bit pattern.

Functions

Name

Description

Name

Description

ConstructFloatPow2(int)

Constructs a float which is exactly equal to 1x2^exponent.

ConvertColourToV(GeoColour)

The 4 float components of v128 correspond to the native ordering of the 4 byte components of u32.

ConvertVToColour(v128)

The 4 float components of v128 correspond to the native ordering of the 4 byte components of u32.

ConvertVToIntensity(v128)

The 4 float components of v128 correspond to the native ordering of the 4 byte components of u32.

GetFloatExponent(float)

Extract the exponent of the given float, accounting for the bias (i.e. the result is in the range -127 to +128).

GetFloatMantissa(float)

Extracts the mantissa of the given float.

PackFloatToFixedWidth(float)

Packs a single-precision floating point number into a floating point number with the given number of exponent and mantissa bits.

PackFloatToRgbm(v128, bool)

Pack a v128 colour value into a u32 in RGBM format.

PackFloatToSharedExponent999e5(v128)

Packs a 4-vector of single-precision floating point numbers into a "shared exponent" 999e5 format.

UnpackFloatFromFixedWidth(u32)

Unacks a single-precision floating point number from a floating point number with the given number of exponent and mantissa bits.

UnpackFloatFromSharedExponent999e5(u32)

Unpacks a 4-vector of single-precision floating point numbers from a "shared exponent" 999e5 format.

UnpackRgbmToFloat(u32)

Unpack an rgbm colour into a v128.

VNormaliseLuminance(v128)

Normalise the intensity of a colour vector to have unit luminance.

Typedefs

Name

Description

Name

Description

u32 GeoColour

An 8-bit colour.

Variables

Name

Description

Name

Description

const Geo::v128 g_LuminanceCoefficients = Geo::VConstruct(0.2126f, 0.7152f, 0.0722f, 0.0f)

The coefficients to calculate the luminance from a colour specified in linear sRGB space These values are determined by the CIE 1931 colour space standard and the definition of the sRGB primaries.



GEO_FORCE_INLINE float Geo::ConstructFloatPow2


public: GEO_FORCE_INLINE float ConstructFloatPow2
(
    int exponent
)


Constructs a float which is exactly equal to 1x2^exponent.



v128 GEO_CALL Geo::ConvertColourToV


public: v128 GEO_CALL ConvertColourToV
(
    GeoColour colour
)