ハート
#define G(n)o.rgb+=m[n]*i/6.;#define C(n)abs(p.x-p.y+i-n)<=.13
— Narumium (@Nr_Narumium) November 14, 2020
mat3 m=mat3(.9);vec2 p=1.5*(FC.xy*2.-r)/r,q;float i,y,a;for(i=0.;i<6.1;i+=.3,y=mod(t,4.)+1.7,a=abs(i-y),q=p){if(C(3.)){if(a<=.6)q=p+.2-a/3.;if(q.x*q.x*q.y*q.y*q.y-pow(dot(q,q)-1.,3.)>0.)G(2)else G(1)}if(C(3.15))G(0)} pic.twitter.com/zO7zSAw7PY
整形コード
#define G(n)o.rgb+=m[n]*i/6.;
#define C(n)abs(p.x-p.y+i-n)<=.13
mat3 m=mat3(.9);vec2 p=1.5*(FC.xy*2.-r)/r,q;
float i,y,a;
for(i=0.;i<6.1;i+=.3,y=mod(t,4.)+1.7,a=abs(i-y),q=p){
if(C(3.)){if(a<=.6)q=p+.2-a/3.;
if(q.x*q.x*q.y*q.y*q.y-pow(dot(q,q)-1.,3.)>0.)G(2)else G(1)}
if(C(3.15))G(0)
}