🏠 Games Tutorials Dev blog JS code golf Other projects

ShadeRandom

May 2016 - October 2017 - February 2018

An app that generates random, shareable, WebGL shaders.

Sometimes you'll see only one fixed color, but keep refreshing and cool stuff can appear!

October 2017 update: it's now a golfed app, made during #golfctober 2017

February 2018 update: 1KB version submitted to JS1k 2018!

- Github

- Original demo (mosaic)

- JS1k demo

- JS1k demo commented source code

- making-of

- Bonus: the craziest random shader generated by this app!

<body id=b>
<canvas id=a width=900 height=900></canvas>
<script>
d = document;
g = a.getContext("webgl");
for(_='),U`U^sqrt ~2 #=s"at@ma?reHteGlokstyle=jf(Y);XorWcos ) (KK0,void ?in;(){gl_rasifk@b=>sS(S=cS(FN.Hplace(/iFmegColWvecn M@h.ndom().lengthiTimegl_FgCoWd.	}^ce(SUaS(P,SUYgYP,`width:100vw;height:`=A;`unifWmiResolution/g,P(``.split` `))fW(i ig)g[i[b.b=0]+i[6]]=g[i];a.j`80vh`;d.wriG`<GxtaHa id=l j20vh;?rgin:0;font-ze:9px>`;s=;P=b[*b|0];(S={o";s"A4(K,K,K,KA+AA*BA/BA-AD(AE(A,A)K( Z/n(D(KE(K,+-*/K	x/.x	y/.yZBK ADdians degHes taaa@aexp kg exp#kg#~inverse~abs gfkW ceil fct nW?lizeE@apow mod mi?x sGp HflectZ/g,(9*).toFixed(2)XiY(o="&&500>s)||5e4<s)s=;iYo!"||=")S(Xelse with(g){l.value=`I?ge(out 4 f,#C){\\ f${s}\\n}`,P=cP(U+1U`@tribuG #PPotion=4(P,1XU`pHciomediump ;  ,; #F${s}k(PUug(PUbYB=ET-3,cB()UeV(0UvA(2,5121,0UbD(B,Int8Ary.oY1,B,1,1UB+82UF=T=setInGrval({1^T+=.01X1^F++X2^90900Xdr(6,3)},9)}})()';G=/[-W-YjkGH?@"#~^U]/.exec(_);)with(_.split(G))_=join(shift());eval(_)<3
</script>