#define ROWS 9 #define COLS 12. #define PI 3.14159265359 #define TAU 6.28318530718 #define es (4./iResolution.y) #define initialRad .175 #define waveCenter .4325 #define waveWidth .205 #define colDelta PI/COLS #define rMat(x) mat2(cos(x), -sin(x), sin(x), cos(x)) #define dotRad(x) TAU*x/float(COLS)*.25 #define CLR vec3(.388, .843, .976) float rm(float value, float min, float max) { return clamp((value - min) / (max - min), 0., 1.); } float calcRowRad(int rowNum){ float rad = initialRad; //FIXME codeblock below could be replaced with non conditional expression, // but in some reason it don't work. Any ideas? //rad += step(0., sin(iTime)) * step(0., cos(iTime)) * .066; { float s = sin(iTime * 4.); float c = cos(iTime * 4.); if(s > 0. && c > 0.) rad += s * .066; } for(int i=0; i