open .fs {
"DESCRIPTION" : "Layered golden-angle phyllotaxis — counter-rotating sunflower lattices of glowing dots and rings around a bright core." ,
"CREDIT" : "claude-opus-4-8" ,
"INPUTS" : [
{ "NAME" : "count" , "TYPE" : "float" , "DEFAULT" : 360.0 , "MIN" : 60.0 , "MAX" : 500.0 } ,
{ "NAME" : "spread" , "TYPE" : "float" , "DEFAULT" : 0.05 , "MIN" : 0.02 , "MAX" : 0.09 } ,
{ "NAME" : "size" , "TYPE" : "float" , "DEFAULT" : 0.03 , "MIN" : 0.01 , "MAX" : 0.06 } ,
{ "NAME" : "hue" , "TYPE" : "float" , "DEFAULT" : 0.08 , "MIN" : 0.0 , "MAX" : 1.0 }
]
}
vec3 palette (float t){
return 0.5 + 0.5 * cos (6.28318 * (t + vec3 (0.0 , 0.33 , 0.67 ) + hue));
}
void main (){
vec2 uv = (gl_FragCoord .xy - 0.5 * RENDERSIZE ) / RENDERSIZE .y;
const float GA = 2.39996323 ;
vec3 col = vec3 (0.0 );
col += palette (0.5 + 0.08 * TIME ) * 0.35 * exp (-dot (uv, uv) * 9.0 );
int N = int (count);
for (int i = 0 ; i < 500 ; i++){
if (i >= N) break ;
float fi = float (i);
float ang = fi * GA + TIME * 0.3 ;
float rad = spread * sqrt (fi);
vec2 pos = rad * vec2 (cos (ang), sin (ang));
float d = length (uv - pos);
float s = size * (1.0 - 0.4 * rad);
float core = smoothstep (s, s * 0.35 , d);
float halo = exp (-d * d / (s * s * 7.0 )) * 0.45 ;
float phase = fi / count;
vec3 c = palette (phase + 0.1 * sin (TIME * 0.5 + fi * 0.05 ));
float puls = 0.65 + 0.45 * sin (TIME * 2.0 - fi * 0.2 );
col += (core + halo) * c * puls;
}
int M = int (count * 0.7 );
for (int i = 0 ; i < 500 ; i++){
if (i >= M) break ;
float fi = float (i);
float ang = fi * GA - TIME * 0.22 + 1.3 ;
float rad = spread * 1.18 * sqrt (fi);
vec2 pos = rad * vec2 (cos (ang), sin (ang));
float d = length (uv - pos);
float rr = size * 0.62 * (1.0 - 0.4 * rad);
float ring = smoothstep (rr * 0.5 , 0.0 , abs (d - rr)) * 0.8 ;
vec3 c = palette (0.5 + fi / float (M) + 0.05 * TIME );
float puls = 0.6 + 0.4 * sin (TIME * 1.6 + fi * 0.15 );
col += ring * c * puls;
}
col = col / (1.0 + 0.7 * col);
col += 0.015 ;
col = pow (col, vec3 (0.82 ));
gl_FragColor = vec4 (col, 1.0 );
}