I just came across this and thought it was interesting to share. A way of fast generating some procedural palettes. With the fast trigonometry functions in FastLED this might be possible to implement I think: http://www.iquilezles.org/www/articles/palettes/palettes.htm
vec3 palette( in float t, in vec3 a, in vec3 b, in vec3 c, in vec3 d )
{
return a + bcos( 6.28318(c*t+d) );
}
Does anyone know how to make that compatible with arduino? I have never seen ‘in vec3’ before.
interesting post Kasper
I think he describes the values. Just use integers as an input. Vec3 is used in shaders to store color. You can return a CRGB value, probably you have to do this for each color component separately.