open .fs {
"DESCRIPTION" : "Liquid Aurora — domain-warped fractal flow field with iridescent, glassy color. A slow-breathing curtain of light that folds over itself." ,
"CREDIT" : "made with glslop" ,
"CATEGORIES" : [ "abstract" , "noise" , "color" ] ,
"INPUTS" : [
{ "NAME" : "speed" , "TYPE" : "float" , "DEFAULT" : 1.0 , "MIN" : 0.0 , "MAX" : 3.0 } ,
{ "NAME" : "warp" , "TYPE" : "float" , "DEFAULT" : 1.0 , "MIN" : 0.0 , "MAX" : 2.5 } ,
{ "NAME" : "zoom" , "TYPE" : "float" , "DEFAULT" : 1.6 , "MIN" : 0.5 , "MAX" : 4.0 } ,
{ "NAME" : "glow" , "TYPE" : "float" , "DEFAULT" : 1.0 , "MIN" : 0.0 , "MAX" : 2.0 } ,
{ "NAME" : "hueShift" , "TYPE" : "float" , "DEFAULT" : 0.0 , "MIN" : 0.0 , "MAX" : 1.0 }
]
}
float hash (vec2 p){
p = fract (p * vec2 (123.34 , 456.21 ));
p += dot (p, p + 45.32 );
return fract (p.x * p.y);
}
float vnoise (vec2 p){
vec2 i = floor (p);
vec2 f = fract (p);
f = f * f * (3.0 - 2.0 * f);
float a = hash (i + vec2 (0.0 , 0.0 ));
float b = hash (i + vec2 (1.0 , 0.0 ));
float c = hash (i + vec2 (0.0 , 1.0 ));
float d = hash (i + vec2 (1.0 , 1.0 ));
return mix (mix (a, b, f.x), mix (c, d, f.x), f.y);
}
float fbm (vec2 p){
float sum = 0.0 ;
float amp = 0.55 ;
mat2 rot = mat2 (0.80 , 0.60 , -0.60 , 0.80 );
for (int i = 0 ; i < 5 ; i++){
sum += amp * vnoise (p);
p = rot * p * 2.02 + 7.13 ;
amp *= 0.5 ;
}
return sum;
}
vec3 palette (float t){
vec3 a = vec3 (0.50 , 0.45 , 0.50 );
vec3 b = vec3 (0.55 , 0.50 , 0.55 );
vec3 c = vec3 (1.0 , 1.0 , 1.0 );
vec3 d = vec3 (0.10 , 0.55 , 0.85 );
return a + b * cos (6.28318 * (c * t + d));
}
void main (){
vec2 uv = isf_FragNormCoord ;
vec2 p = (uv - 0.5 );
p.x *= RENDERSIZE .x / RENDERSIZE .y;
p *= zoom;
float t = TIME * 0.18 * speed;
vec2 q = vec2 (
fbm (p + vec2 (0.0 , 0.0 ) + t),
fbm (p + vec2 (5.2 , 1.3 ) - t * 0.7 )
);
vec2 r = vec2 (
fbm (p + warp * q + vec2 (1.7 , 9.2 ) + 0.15 * t),
fbm (p + warp * q + vec2 (8.3 , 2.8 ) - 0.12 * t)
);
float f = fbm (p + warp * r);
f = clamp ((f - 0.22 ) / 0.56 , 0.0 , 1.0 );
float depth = dot (q, q) + dot (r, r);
float hue = 1.3 * f + 0.75 * depth + 0.25 * sin (t * 1.3 ) + hueShift;
vec3 col = palette (hue);
float body = smoothstep (0.08 , 0.70 , f);
vec3 deep = vec3 (0.01 , 0.015 , 0.04 );
col = mix (deep, col * (0.35 + 1.1 * f), body);
float lum = dot (col, vec3 (0.299 , 0.587 , 0.114 ));
col = mix (vec3 (lum), col, 1.55 );
float ridge = 1.0 - abs (2.0 * f - 1.0 );
ridge = pow (ridge, 4.0 );
col += glow * 1.4 * ridge * vec3 (0.45 , 0.95 , 0.85 ) * (0.5 + 0.8 * depth);
col += glow * 0.45 * pow (length (r), 1.5 ) * vec3 (0.85 , 0.35 , 1.0 );
float core = smoothstep (0.55 , 0.62 , f) * (1.0 - smoothstep (0.62 , 0.72 , f));
col += glow * core * vec3 (1.0 , 0.9 , 0.7 ) * 1.2 ;
col *= 0.82 ;
float vig = smoothstep (1.45 , 0.15 , length (uv - 0.5 ) * 1.7 );
col *= mix (0.18 , 1.0 , vig);
col = (col * (2.51 * col + 0.03 )) / (col * (2.43 * col + 0.59 ) + 0.14 );
col = clamp (col, 0.0 , 1.0 );
col = pow (col, vec3 (0.4545 ));
gl_FragColor = vec4 (col, 1.0 );
}