暖色压在倦意上
这一幅没能在你的浏览器里编译。
源码Rothko-style soft-edged color field blocks with fbm-feathered borders, horizontal brush-streak modulation, breathing scale, glowing seam and drifting fbm cloud shade
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;
}
float field(vec2 p,vec2 c,vec2 h,float soft,float t){
vec2 q=abs(p-c)-h;
float d=length(max(q,0.0))+min(max(q.x,q.y),0.0);
d+=(fbm(p*3.0+vec2(t,-t*0.7))-0.5)*0.09;
return 1.0-smoothstep(-soft,soft,d);
}
void main(){
vec2 uv=gl_FragCoord.xy/u_resolution;
float asp=u_resolution.x/u_resolution.y;
vec2 p=(gl_FragCoord.xy-0.5*u_resolution)/u_resolution.y;
float t=u_time*0.05;
float br=sin(u_time*0.35);
// background wash: dusty blue-grey to warm grey
vec3 bg=mix(vec3(0.40,0.43,0.50),vec3(0.60,0.52,0.47),uv.y);
bg*=0.92+0.16*fbm(p*2.0+vec2(t*0.5,0.0));
vec3 col=bg;
// brush streak texture (horizontal, low frequency)
float streak=fbm(vec2(p.x*1.5+t*0.3,p.y*7.0));
// lower heavy field: muted plum-slate
vec2 hb=vec2(asp*0.36,0.15+0.006*br);
float mb=field(p,vec2(0.0,-0.23),hb,0.045,t+3.0);
vec3 cb=mix(vec3(0.33,0.30,0.40),vec3(0.42,0.35,0.42),streak);
col=mix(col,cb,mb*0.95);
// upper warm field: apricot amber
vec2 ht=vec2(asp*0.38,0.17+0.008*br);
float mt=field(p,vec2(0.0,0.19),ht,0.04,t);
vec3 ct=mix(vec3(0.86,0.47,0.27),vec3(0.95,0.66,0.36),streak);
ct=mix(ct,vec3(0.97,0.74,0.45),0.25*smoothstep(0.1,0.35,p.y));
col=mix(col,ct,mt*0.96);
// glowing seam between the fields
float sx=1.0-smoothstep(asp*0.30,asp*0.42,abs(p.x));
float seam=exp(-pow((p.y+0.035)/0.035,2.0))*sx;
col+=vec3(1.0,0.78,0.48)*0.16*seam*(0.85+0.15*br);
// warm low autumn light from upper left
float lg=1.0-smoothstep(0.0,1.3,length(p-vec2(-0.7,0.55)));
col+=vec3(0.10,0.06,0.01)*lg;
// drifting cloud shade (light wind, partly cloudy)
float cs=fbm(p*1.2+vec2(u_time*0.018,u_time*0.004));
float sh=smoothstep(0.48,0.72,cs);
col*=1.0-0.17*sh;
// soft vignette
vec2 v=uv-0.5;
col*=1.0-0.35*dot(v,v)*1.6;
col=clamp(col,0.04,0.95);
gl_FragColor=vec4(col,1.0);
}