LYGIA Shader Library

hue (lygia/sample/hue)

samples a hue rainbox pattern color encoded texture and returns a float

Dependencies:

Use:

<fluat> sampleHue(<SAMPLER_TYPE> tex, <vec2> st);

Check it on Github



#ifndef SAMPLEHUE_SAMPLE_FNC
#define SAMPLEHUE_SAMPLE_FNC(TEX, UV) SAMPLER_FNC(TEX, UV)
#endif

#ifndef FNC_SAMPLEHUE
#define FNC_SAMPLEHUE
float sampleHue(SAMPLER_TYPE tex, vec2 st) { 
    return rgb2hue( SAMPLER_FNC( tex, st ) ); 
}
#endif

Dependencies:

Use:

<fluat> sampleHue(<SAMPLER_TYPE> tex, <float2> st);

Check it on Github



#ifndef SAMPLEHUE_SAMPLE_FNC
#define SAMPLEHUE_SAMPLE_FNC(TEX, UV) SAMPLER_FNC(TEX, UV)
#endif

#ifndef FNC_SAMPLEHUE
#define FNC_SAMPLEHUE
float sampleHue(SAMPLER_TYPE tex, float2 st) { 
    return rgb2hue( SAMPLER_FNC( tex, st ) ); 
}
#endif

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