Motion
Get Motion

ReferenceMaterial nodesColour

Colour Palette

One of four colours, by number (it wraps round).

ColourpaletteNode

Inputs

PinTypeStarts atNotes
Indexwhichfloat0–
Colour 0colour1vec3"#7ce695"–
Colour 1colour2vec3"#caecff"–
Colour 2colour3vec3"#a98bff"–
Colour 3colour4vec3"#ffc861"–

Outputs

PinType
outvec3

The code it becomes

What Studio writes for the graph below: a few lines of the material's shader, worked out for every pixel.

void mainImage(out vec4 fragColor, in vec2 fragCoord){    vec3 n2_out = (mod(floor(0.0), 4.0) < 1.0 ? vec3(0.48627, 0.90196, 0.58431) : mod(floor(0.0), 4.0) < 2.0 ? vec3(0.79216, 0.92549, 1.0) : mod(floor(0.0), 4.0) < 3.0 ? vec3(0.66275, 0.5451, 1.0) : vec3(1.0, 0.78431, 0.38039));    fragColor = vec4(n2_out, 1.0);}

In a graph

Texture coordinates into the node, and the node into the material, as Studio draws them.