runnable fragment

SHKStaticRainbowNoise

shaderkit material glsl runnable fragment MIT
code snippet
precision mediump float;
varying vec2 v_tex_coord;
varying vec4 v_color_mix;
vec4 SKDefaultShading(){ return vec4(1.0); }
//
// Creates fixed multi-colored noise.
//
// This works using a simple (but brilliant!) and well-known trick: if you
// calculate the dot product of a texture coordinate with a vec2 containing
// two numbers that are unlikely to repeat, then calculate the sine of that
// and multiply it by a large number, you'll end up with what looks more or
// less like random numbers in the fraction digits – i.e., everything after
// the decimal place.
//