This is the documentation for Enlighten.
module Colours
Classes
Name | Description |
|---|---|
| |
Allow safe conversion between a float and its representative bit pattern. |
Functions
Name | Description |
|---|---|
Constructs a float which is exactly equal to 1x2^exponent. | |
The 4 float components of v128 correspond to the native ordering of the 4 byte components of u32. | |
The 4 float components of v128 correspond to the native ordering of the 4 byte components of u32. | |
The 4 float components of v128 correspond to the native ordering of the 4 byte components of u32. | |
Extract the exponent of the given float, accounting for the bias (i.e. the result is in the range -127 to +128). | |
Extracts the mantissa of the given float. | |
Packs a single-precision floating point number into a floating point number with the given number of exponent and mantissa bits. | |
Pack a v128 colour value into a u32 in RGBM format. | |
Packs a 4-vector of single-precision floating point numbers into a "shared exponent" 999e5 format. | |
Unacks a single-precision floating point number from a floating point number with the given number of exponent and mantissa bits. | |
Unpacks a 4-vector of single-precision floating point numbers from a "shared exponent" 999e5 format. | |
Unpack an rgbm colour into a v128. | |
Normalise the intensity of a colour vector to have unit luminance. |
Typedefs
Name | Description |
|---|---|
u32 GeoColour | An 8-bit colour. |
Variables
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
)