← Daily shaders~/adventure-log/shaders/2026-10-11

The Window Seat, Slowing Down

The Window Seat, Slowing DownDistant hills smear into warm bands drifting past; dust dozes in a slant of sun. · Mostly clear 15–26°C
Sourceparallax anisotropic fbm motion-smear bands with eased drift, soft low sun glow, diagonal light shaft with drifting dust motes
2026-10-11.frag
precision mediump float;
uniform vec2 u_resolution;
uniform float u_time;
float hash(vec2 p){return fract(sin(dot(p,vec2(127.1,311.7)))*43758.5453);}
float noise(vec2 p){
  vec2 i=floor(p);vec2 f=fract(p);f=f*f*(3.0-2.0*f);
  return mix(mix(hash(i),hash(i+vec2(1.0,0.0)),f.x),mix(hash(i+vec2(0.0,1.0)),hash(i+vec2(1.0,1.0)),f.x),f.y);
}
float fbm(vec2 p){
  float v=0.0;float a=0.5;
  for(int i=0;i<4;i++){v+=a*noise(p);p=p*2.03+vec2(1.7,9.2);a*=0.5;}
  return v;
}
vec3 pal(float x){
  return vec3(0.62,0.50,0.45)+vec3(0.22,0.17,0.15)*cos(6.2831*(vec3(1.0,0.9,0.8)*x+vec3(0.0,0.12,0.25)));
}
void main(){
  vec2 uv=gl_FragCoord.xy/u_resolution.xy;
  float asp=u_resolution.x/u_resolution.y;
  vec2 p=vec2((uv.x-0.5)*asp,uv.y-0.5);
  float t=u_time;
  vec3 col=mix(vec3(0.97,0.84,0.70),vec3(0.70,0.78,0.86),smoothstep(-0.05,0.5,p.y));
  vec2 sun=vec2(-0.38,0.16);
  float sd=length(p-sun);
  col+=vec3(1.0,0.78,0.5)*(exp(-sd*5.0)*0.35+smoothstep(0.075,0.05,sd)*0.22);
  for(int i=0;i<4;i++){
    float fi=float(i);
    float sp=0.015+fi*0.018;
    float x=p.x*(0.8+fi*0.3)+sp*(t+4.0*sin(t*0.06));
    float n=fbm(vec2(x*0.9,p.y*(5.0+fi*2.0)+fi*7.3));
    float h=0.04-fi*0.12;
    float edge=h+(fbm(vec2(x*2.0,fi*3.0))-0.5)*0.12;
    float m=smoothstep(edge+0.015,edge-0.015,p.y);
    vec3 c=pal(n*0.8+fi*0.18+0.05);
    c=mix(c,vec3(0.93,0.82,0.72),0.45-fi*0.1);
    float streak=noise(vec2(x*0.5+fi*5.0,p.y*24.0));
    c*=0.9+0.16*streak;
    col=mix(col,c,m);
  }
  vec2 d=normalize(vec2(0.8,-0.35));
  vec2 q=p-sun;
  float pd=abs(d.x*q.y-d.y*q.x);
  float along=dot(q,d);
  float beam=exp(-pd*pd*30.0)*smoothstep(0.0,0.3,along)*smoothstep(1.6,0.4,along);
  col+=vec3(1.0,0.85,0.6)*beam*0.12;
  for(int i=0;i<14;i++){
    float fi=float(i);
    vec2 r=vec2(hash(vec2(fi,1.3)),hash(vec2(fi,2.7)));
    float fx=fract(r.x+t*0.008*(0.5+r.y));
    float fy=fract(r.y+t*0.004*(0.6+r.x));
    vec2 mp=vec2((fx-0.5)*asp,fy-0.5)+0.03*vec2(sin(t*0.3+fi),cos(t*0.23+fi*2.0));
    float md=length(p-mp);
    float fade=sin(3.1416*fx)*sin(3.1416*fy);
    float tw=0.6+0.4*sin(t*0.4+fi*1.7);
    col+=vec3(1.0,0.9,0.72)*smoothstep(0.02,0.007,md)*(0.08+beam*0.5)*fade*tw;
  }
  float br=0.5+0.5*sin(t*0.35);
  col*=1.0-0.2*pow(abs(uv.y-0.5)*2.0,3.0)*(0.8+0.2*br);
  col*=1.0-0.12*dot(p,p);
  col=mix(col,vec3(dot(col,vec3(0.333))),0.12);
  gl_FragColor=vec4(clamp(col,0.0,0.97),1.0);
}