Difference between revisions of "LlsRGB2Linear"
Jump to navigation
Jump to search
m (Added note about EOTF functionality.) |
m (More reference links.) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 8: | Line 8: | ||
|spec=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. | |spec=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. | The sRGB (Standard Red Green Blue) colorspace is defined in [https://www.color.org/srgb04.xalter 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). | This calculation is known as an Electro-Optical Transfer Function (EOTF). | ||
|caveats | |caveats= | ||
*The name of this function is actually a misnomer as LSL color is actually in [https://www.color.org/chardata/rgb/BT709.xalter Rec.709] space, not [https://www.color.org/chardata/rgb/srgb.xalter 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 | |examples | ||
|helpers | |helpers | ||
Line 18: | Line 19: | ||
|also | |also | ||
|also_functions= | |also_functions= | ||
{{LSL DefineRow||[[llLinear2sRGB]]}} To convert from sRGB to the Linear colorspace. | {{LSL DefineRow||[[llLinear2sRGB]]}} To convert from sRGB to the Linear colorspace. (Inverse EOTF) | ||
}} | }} |
Revision as of 05:26, 18 April 2022
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
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
Examples
See Also
Functions
• | llLinear2sRGB | To convert from sRGB to the Linear colorspace. (Inverse EOTF) |