3 ms·
Works fine in GLSL (https://www.shadertoy.com/view/tdV3DW https://www.shadertoy.com/view/tdV3DW) Starting on green and mapped to [0, 1] like op's: vec3 co
by kaoD 7y ago
Works fine in GLSL (https://www.shadertoy.com/view/tdV3DW https://www.shadertoy.com/view/tdV3DW)
Starting on green and mapped to [0, 1] like op's:
vec3 coolhue2(float h){
float h6 = 6.*h;
return saturate(
vec3(
2. - abs(h6 - 4.),
abs(h6 - 3.) - 1.,
2. - abs(h6 - 2.)
));
}