Where the Night Rain Dried
This one didn't compile in your browser.
Sourcethresholded fbm wet-stain mask with edge pooling, sky-reflection tint and drifting cloud shadows
precision mediump float;
uniform vec2 u_resolution;
uniform float u_time;
float h(vec2 p){return fract(sin(dot(p,vec2(127.1,311.7)))*43758.5453);}
float n(vec2 p){
vec2 i=floor(p);vec2 f=fract(p);
f=f*f*(3.0-2.0*f);
return mix(mix(h(i),h(i+vec2(1.0,0.0)),f.x),mix(h(i+vec2(0.0,1.0)),h(i+vec2(1.0,1.0)),f.x),f.y);
}
float fbm(vec2 p){
float s=0.0;float a=0.5;
mat2 r=mat2(0.8,0.6,-0.6,0.8);
for(int i=0;i<5;i++){
s+=a*n(p);
p=r*p*2.02+vec2(1.7,9.2);
a*=0.5;
}
return s;
}
void main(){
vec2 uv=gl_FragCoord.xy/u_resolution;
vec2 p=(gl_FragCoord.xy-0.5*u_resolution)/u_resolution.y;
float t=u_time;
float g=fbm(p*3.0+11.0);
vec3 stone=mix(vec3(0.70,0.66,0.59),vec3(0.84,0.80,0.72),g);
float a=smoothstep(0.45,0.75,fbm(p*1.3+vec2(4.0,-2.0)));
stone=mix(stone,vec3(0.82,0.63,0.42),a*0.35);
vec2 q=p*1.6;
q+=0.15*vec2(fbm(p*2.0+t*0.02),fbm(p*2.0-t*0.017+3.1));
float w=fbm(q);
float th=0.48+0.06*sin(t*0.06);
float d=w-th;
float wet=smoothstep(0.0,0.035,d);
float rim=smoothstep(0.0,0.02,d)*(1.0-smoothstep(0.02,0.08,d));
float grad=smoothstep(-0.5,0.6,p.y+0.2*sin(p.x*1.5+t*0.05));
vec3 refl=mix(vec3(0.36,0.41,0.45),vec3(0.62,0.66,0.68),grad);
float cl=fbm(p*vec2(1.2,2.4)+vec2(t*0.03,0.0));
refl=mix(refl,vec3(0.74,0.75,0.74),cl*0.4);
vec3 wetCol=mix(stone*0.55,refl,0.5);
vec3 col=mix(stone,wetCol,wet);
col=mix(col,stone*0.5,rim*0.45);
float sh=fbm(p*0.8+vec2(t*0.015,t*0.005));
col*=0.88+0.2*sh;
col+=vec3(0.06,0.045,0.02)*smoothstep(0.9,-0.2,length(p-vec2(0.5,0.4)));
vec2 v=uv-0.5;
col*=1.0-0.5*dot(v,v);
gl_FragColor=vec4(col,1.0);
}