LYGIA Shader Library

xyY2rgb (lygia/color/space/xyY2rgb)

Converts from xyY to linear RGB

Dependencies:

Use:

<vec3|vec4> xyY2rgb(<vec3|vec4> xyY)

Check it on Github



#ifndef FNC_XYY2RGB
#define FNC_XYY2RGB
vec3 xyY2rgb(const in vec3 xyY) { return xyz2rgb(xyY2xyz(xyY));}
vec4 xyY2rgb(const in vec4 xyY) { return vec4(xyz2rgb(xyY2xyz(xyY.xyz)), xyY.w);}
#endif

Dependencies:

Use:

<float3|float4> xyY2rgb(<float3|float4> xyY)

Check it on Github



#ifndef FNC_XYY2RGB
#define FNC_XYY2RGB
float3 xyY2rgb(float3 xyY) { return xyz2rgb(xyY2xyz(xyY));}
float4 xyY2rgb(float4 xyY) { return float4(xyz2rgb(xyY2xyz(xyY.xyz)), xyY.w);}
#endif

Dependencies:

Check it on Github


fn xyY2rgb(xyY: vec3f) -> vec3f { return xyz2rgb(xyY2xyz(xyY)); }

License

LYGIA is dual-licensed under the Prosperity License and the Patron License for sponsors and contributors.

Sponsors and contributors are automatically added to the Patron License and they can ignore the any non-commercial rule of the Prosperity Licensed software (please take a look to the exception).

It's also possible to get a permanent comercial license hook to a single and specific version of LYGIA.

Get the latest news and releases

Sign up for the news letter bellow, joing the LYGIA's channel on Discord or follow the Github repository