llsRGB2Linear

From Second Life Wiki
Revision as of 22:30, 6 October 2022 by Joanne Furlough (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Summary

Function: vector llsRGB2Linear( vector srgb );

Returns a vector Transforms a color specified in the sRGB colorspace to the linear RGB colorspace.

• vector srgb Color in the sRGB color space.

Specification

Lights in Second Life are specified in LSL as linear red, green blue values in the range (0.0, 1.0). Internally light calculations are performed in the sRGB colorspace.

The sRGB (Standard Red Green Blue) colorspace is defined in IEC 61966-2-1:1999 and was developed as a joint project between Microsoft and HP.

This calculation is known as an Electro-Optical Transfer Function (EOTF).

Caveats

  • The name of this function is actually a misnomer as LSL color is actually in Rec.709 space, not sRGB space. While they are very similar, the gamma value for sRGB is approx. 2.2, whereas the gamma value for Rec.709 is approx. 2.4.

Examples

See Also

Functions

•  llLinear2sRGB To convert from the Linear colorspace to sRGB. (Inverse EOTF)

Deep Notes

Signature

function vector llsRGB2Linear( vector srgb );