SF syn.fun
← functions FUNCTION GLSL

cosinePalette

iq-style cosine gradient, pre-tuned for syn-style palette modulation.

#color#palette

Useful when you want a compact palette function that is easy to animate with a single phase value.

vec3 cosinePalette(float t, vec3 a, vec3 b, vec3 c, vec3 d) {
    return a + b * cos(6.28318 * (c * t + d));
}
submitted by
@ogcraig
author
iq
license
MIT