diff --git a/public/data/2024_10_21_shader_jam_monday_night_bytes.json b/public/data/2024_10_21_shader_jam_monday_night_bytes.json new file mode 100644 index 00000000..eee69d6e --- /dev/null +++ b/public/data/2024_10_21_shader_jam_monday_night_bytes.json @@ -0,0 +1,118 @@ +{ + "title": "Monday Night Bytes ", + "started": "2024-10-21", + "date": "21 October 2024", + "type": "Shader Jam", + "website": "", + "flyer": "", + "vod":"https://scenesat.com/videoarchive/34d15105-8ffd-11ef-8ebb-00505685775e#show-34d15105-8ffd-11ef-8ebb-00505685775e", + "software_used": [ + { + "name": "Bonzomatic", + "url": "https://github.com/wrightwriter/Bonzomatic-Compute/releases/tag/v1.0.1", + "version": "Wrighter Compute - v1", + "purpose": "Graphic" + }, + { + "name": "TIC-80 FFT Hack", + "url": "https://github.com/aliceisjustplaying/TIC-80/releases/tag/v0.0.5", + "version": "tic80showdown Alice fork v0.0.5", + "purpose": "Graphic" + } + ], + "phases": [ + { + "title": null, + "vod": null, + "entries": [ + { + "id": null, + "rank": null, + "points": null, + "handle": { + "name": "aldroid", + "demozoo_id": 63755 + }, + "shadertoy_url": null, + "preview_image": null, + "source_file": null + }, + { + "id": null, + "rank": null, + "points": null, + "handle": { + "name": "jtruk", + "demozoo_id": 135705 + }, + "shadertoy_url": null, + "preview_image": "2024_10_21_shader_jam_monday_night_bytes/jtruk.gif", + "source_file": "/shader_file_sources/2024_10_21_shader_jam_monday_night_bytes/jtruk.lua" + }, + { + "id": null, + "rank": null, + "points": null, + "handle": { + "name": "Catnip", + "demozoo_id": 113525 + }, + "shadertoy_url": null, + "preview_image": "2024_10_21_shader_jam_monday_night_bytes/catnip.jpg", + "source_file": "/shader_file_sources/2024_10_21_shader_jam_monday_night_bytes/catnip.glsl" + }, + { + "id": null, + "rank": null, + "points": null, + "handle": { + "name": "pumpuli", + "demozoo_id": 22208 + }, + "shadertoy_url": null, + "preview_image": "2024_10_21_shader_jam_monday_night_bytes/pumpuli.gif", + "source_file": "/shader_file_sources/2024_10_21_shader_jam_monday_night_bytes/pumpuli.lua" + }, + { + "id": null, + "rank": null, + "points": null, + "handle": { + "name": "totetmatt", + "demozoo_id": 121811 + }, + "shadertoy_url": null, + "preview_image": "2024_10_21_shader_jam_monday_night_bytes/totetmatt.jpg", + "source_file": "/shader_file_sources/2024_10_21_shader_jam_monday_night_bytes/totetmatt.glsl" + } + + ], + "staffs": [ + { + "handle": { + "name": "RaccoonViolet", + "demozoo_id": 90373 + }, + "job": "Commentator" + }, + { + "handle": { + "name": "P3RC", + "demozoo_id": null + }, + "job": "DJ" + } + ] + } + ], + "staffs": [ + { + "handle": { + "name": "RaccoonViolet", + "demozoo_id": 90373 + }, + "job": "Organizers" + } + ], + "demozoo_party_id": "LCDZFFCM" +} diff --git a/public/media/2024_10_21_shader_jam_monday_night_bytes/catnip.jpg b/public/media/2024_10_21_shader_jam_monday_night_bytes/catnip.jpg new file mode 100644 index 00000000..6d8a4a70 Binary files /dev/null and b/public/media/2024_10_21_shader_jam_monday_night_bytes/catnip.jpg differ diff --git a/public/media/2024_10_21_shader_jam_monday_night_bytes/jtruk.gif b/public/media/2024_10_21_shader_jam_monday_night_bytes/jtruk.gif new file mode 100644 index 00000000..4b2d4521 Binary files /dev/null and b/public/media/2024_10_21_shader_jam_monday_night_bytes/jtruk.gif differ diff --git a/public/media/2024_10_21_shader_jam_monday_night_bytes/pumpuli.gif b/public/media/2024_10_21_shader_jam_monday_night_bytes/pumpuli.gif new file mode 100644 index 00000000..0f423d8c Binary files /dev/null and b/public/media/2024_10_21_shader_jam_monday_night_bytes/pumpuli.gif differ diff --git a/public/media/2024_10_21_shader_jam_monday_night_bytes/totetmatt.jpg b/public/media/2024_10_21_shader_jam_monday_night_bytes/totetmatt.jpg new file mode 100644 index 00000000..93c4810a Binary files /dev/null and b/public/media/2024_10_21_shader_jam_monday_night_bytes/totetmatt.jpg differ diff --git a/public/shader_file_sources/2024_10_21_shader_jam_monday_night_bytes/catnip.glsl b/public/shader_file_sources/2024_10_21_shader_jam_monday_night_bytes/catnip.glsl new file mode 100644 index 00000000..0df330d0 --- /dev/null +++ b/public/shader_file_sources/2024_10_21_shader_jam_monday_night_bytes/catnip.glsl @@ -0,0 +1,142 @@ +#version 410 core + +uniform float fGlobalTime; // in seconds +uniform vec2 v2Resolution; // viewport resolution (in pixels) +uniform float fFrameTime; // duration of the last frame, in seconds + +uniform sampler1D texFFT; // towards 0.0 is bass / lower freq, towards 1.0 is higher / treble freq +uniform sampler1D texFFTSmoothed; // this one has longer falloff and less harsh transients +uniform sampler1D texFFTIntegrated; // this is continually increasing +uniform sampler2D texPreviousFrame; // screenshot of the previous frame +uniform sampler2D texChecker; +uniform sampler2D texInercia; +uniform sampler2D texInerciaBW; +uniform sampler2D texNoise; +uniform sampler2D texTex1; +uniform sampler2D texTex2; +uniform sampler2D texTex3; +uniform sampler2D texTex4; + +layout(location = 0) out vec4 out_color; // out_color must be written in order to see anything + +#define time fGlobalTime +#define r2d(p,a) p=cos(a)*p + sin(a)*vec2(-p.y,p.x); + +const float maxScale = 1024.; +const int steps = 4; +const float samples = 32.; + +vec3 hash(vec3 p) { + p = fract(p * vec3(443.537, 537.247, 247.428)); + p += dot(p, p.yxz + 19.19); + return fract((p.xxy + p.yxx) * p.zyx); +} + +vec4 plas( vec2 v, float time ) +{ + float c = 0.5 + sin( v.x * 10.0 ) + cos( sin( time + v.y ) * 20.0 ); + return vec4( sin(c * 0.2 + cos(time)), c * 0.15, cos( c * 0.1 + time / .4 ) * .25, 1.0 ); +} + +float cat(vec2 p) { + p.x = abs(p.x); + vec2 q=p; + q.x = abs(q.x-.2); + q.y += q.x - .2; + float r = abs(q.y)<.05 && q.x<.15 ? 1. : 0.; + p.x -= .6; + p.y = abs(p.y) - .08; + r += abs(p.y)<0.03 && abs(p.x)<.15 ? 1. : 0.; + return r; +} + +float bdist(vec3 p, vec3 b, float r) { + p=abs(p)-b - r; + return length(max(p, 0.)) + min(max(p.x, max(p.y, p.z)), 0.) - r; +} + +float tdist(vec3 p, vec2 t) { + vec2 q = vec2(length(p.xy) - t.x, p.z); + return length(q) - t.y; +} + +float smin(float a, float b, float k) { + float h = clamp(.5 + .5 * (b-a)/k, 0., 1.); + return mix(b,a,h) - k*h* ( 1. - h); +} + +float df(vec3 p, float s) { + if (s < 1. / 3.) { + vec3 q=p; + p += sin(vec3(time * 1.242, time * 1.3735, time * 1.5738)); + r2d(p.xy, time * 1.247); + r2d(p.xz, time * 1.672); + + q += sin(vec3(time * 1.442, time * 1.5735, time * 1.1738)); + r2d(q.xy, time * 1.547); + r2d(q.xz, time * 1.472); + + return smin( + tdist(p, vec2(1.5, .5)), + tdist(q, vec2(1.5, .5)), + 0.5); + } else if (s < 2. / 3.) { + vec3 q=p; + p += sin(vec3(time * 1.242, time * 1.3735, time * 1.5738)); + r2d(p.xy, time * 1.247); + r2d(p.xz, time * 1.672); + + q += sin(vec3(time * 1.442, time * 1.5735, time * 1.1738)); + r2d(q.xy, time * 1.547); + r2d(q.xz, time * 1.472); + return smin( + bdist(p, vec3(.5), 0.5), + bdist(q, vec3(.5), 0.5), + 0.5); + } else { + return smin( + length(p + vec3(sin(time * 1.324), sin(time * 1.535), sin(time*1.7536))*1.5) - 1.5, + length(p + vec3(sin(time * 1.124), sin(time * 1.335), sin(time*1.5536))*1.5) - 1.5, + 0.5 + ); + } +} + +vec3 norm(vec3 p, float s) { + vec2 e = vec2(0.001,0); + return normalize(vec3( + df(p+e.xyy,s) - df(p-e.xyy,s), + df(p+e.yxy,s) - df(p-e.yxy,s), + df(p+e.yyx,s) - df(p-e.yyx,s) + )); +} + +vec3 rm(vec3 p, vec3 dir, float s) { + for (int i=0; i<50; i++) { + float d = df(p,s); + if (d<0.0001) { + vec3 n = norm(p,s); + vec3 ld = normalize(vec3(sin(time * 0.47), sin(time * 0.562), sin(time * 0.62849))); + return (abs(n)*.75 +.25) * abs(dot(n, ld)) + pow(max(0., dot(reflect(dir, n), ld)), 50.); + } + p += dir * d; + } + return vec3(0); +} + +void main(void) { + vec2 uv = (gl_FragCoord.xy * 2. - v2Resolution.xy) / v2Resolution.x; + uv *= 2.; + uv.y += time / 3.; + vec2 cell = vec2(floor(uv) + 10.); + vec3 k = hash(vec3(floor(cell * vec2(0,1)), 0.1) / 19.); + uv = fract(uv) * 2. - 1.; + cell.x = mod(cell.x, 2.0); + float sep = -0.3; + vec3 p = vec3((cell.x * 2. -1.) * sep, 0, -5); + vec3 dir = normalize(vec3(uv, 1)); + + vec3 col = rm(p, dir, floor(mod(cell.y, 3.)) / 3.); + + out_color = vec4(col, 0.); +} diff --git a/public/shader_file_sources/2024_10_21_shader_jam_monday_night_bytes/jtruk.lua b/public/shader_file_sources/2024_10_21_shader_jam_monday_night_bytes/jtruk.lua new file mode 100644 index 00000000..7f4490bf --- /dev/null +++ b/public/shader_file_sources/2024_10_21_shader_jam_monday_night_bytes/jtruk.lua @@ -0,0 +1,137 @@ +-- ByteJam 20241021 (jtruk) +-- Greets: Violet,P3RC! +-- Aldroid,Pumpuli,Catnip,Totetmatt + +local S=math.sin +local C=math.cos +local R=math.random +local MIN=math.min +local A=math.atan2 +local PI=math.pi +local TAU=math.pi*2 + +local NX=50 +local NY=50 +local MINN=MIN(NX,NY)/4 +local V={} +local DRIPS={} +local MAX_LIFE=100 + +function rgb(i,r,g,b) + local a=16320+i*3 + poke(a,r) + poke(a+1,g) + poke(a+2,b) +end + +function BDR(y) + local r=40+S(y*.005+T*.008)*40 + local g=40+S(y*.008-T*.009)*40 + local b=40+S(y*.009+T*.007)*40 + rgb(0,r,g,b) + + for i=1,15 do + local v=i/15 + local r=127+S(-i*.03+y*.005+T*.008)*128 + local g=127+S(i*.04+y*.008-T*.009)*128 + local b=127+S(i*.05-y*.009+T*.007)*128 + rgb(i,r*v,g*v,b*v) + end +end + + +T=0 +function TIC() + if R(0,80)<1 then + addDrip(R(1,NX),R(1,NY)) + end + + update() + + cls() + draw() + + T=T+1 +end + +function addDrip(x,y) + DRIPS[getFreeDrip()]={ + x=x, + y=y, + life=0, + } +end + +function getFreeDrip() + for i,d in ipairs(DRIPS) do + if d.life>MAX_LIFE then + return i + end + end + + return #DRIPS+1 +end + +function update() + reset() + local mult=3 + for _,d in ipairs(DRIPS) do + if d.life<=MAX_LIFE then + local spread=d.life//mult + for dy=-spread,spread do + for dx=-spread,spread do + local ox=d.x+dx + local oy=d.y+dy + local r=(dx^2+dy^2)^.5 + if r0 then + local p={x=(x-NX/2)/MINN,y=.3-v*.3,z=(y-NY/2)/MINN} + p.x,p.y=rot(p.x,p.y,S(T*.01)) +-- p.y,p.z=rot(p.y,p.z,S(T*.013)-PI) + p.x,p.z=rot(p.x,p.z,S(T*.012)-PI) + p.z=p.z+3+S(T*.02) + p=proj(p) + + circ(p.x,p.y,3,8+v*8) + end + end + end +end + +function proj(p) + local scale=2/p.z*80 + return { + x=120+p.x*scale, + y=68+p.y*scale, + } +end + +function rot(a,b,r) + return a*C(r)-b*S(r),a*S(r)+b*C(r) +end + +function reset() + for y=0,NY-1 do + V[y]={} + for x=0,NX-1 do + local d=((y-NY/2)^2+(x-NX/2)^2)^.5 + V[y][x]=ffts(d)*2 + end + end +end diff --git a/public/shader_file_sources/2024_10_21_shader_jam_monday_night_bytes/pumpuli.lua b/public/shader_file_sources/2024_10_21_shader_jam_monday_night_bytes/pumpuli.lua new file mode 100644 index 00000000..b47f70b0 --- /dev/null +++ b/public/shader_file_sources/2024_10_21_shader_jam_monday_night_bytes/pumpuli.lua @@ -0,0 +1,176 @@ +W=240 +H=136 +BPM=174 +STEP=3 + +max=math.max +min=math.min +abs=math.abs +rnd=math.random +sin=math.sin + +cyan={ + 0x04,0x0d,0x0c,0x1c,0x13,0x2b, + 0x22,0x19,0x3a,0x26,0x1e,0x49, + 0x28,0x24,0x58,0x2a,0x2d,0x67, + 0x2f,0x3a,0x77,0x35,0x4a,0x86, + 0x3a,0x5c,0x96,0x3f,0x70,0xa5, + 0x45,0x87,0xb5,0x50,0x9d,0xbe, + 0x5f,0xb1,0xc4,0x6e,0xc3,0xcb, + 0xa3,0xdc,0xb9,0xde,0xee,0xd7} + +orange={ + 0x1a,0x0c,0x0a,0x2e,0x15,0x10, + 0x43,0x1e,0x15,0x59,0x27,0x19, + 0x70,0x31,0x1b,0x88,0x3d,0x1c, + 0xa1,0x49,0x1d,0xbb,0x57,0x1c, + 0xd7,0x66,0x1a,0xeb,0x79,0x20, + 0xf1,0x8d,0x32,0xf7,0xa0,0x46, + 0xfc,0xb3,0x5b,0xff,0xc3,0x70, + 0xe8,0xf1,0xaa,0xde,0xee,0xd7} + +white={ + 0x00,0x00,0x00,0x10,0x10,0x10, + 0x20,0x20,0x20,0x30,0x30,0x30, + 0x40,0x40,0x40,0x50,0x50,0x50, + 0x60,0x60,0x60,0x70,0x70,0x70, + 0x80,0x80,0x80,0x90,0x90,0x90, + 0xa0,0xa0,0xa0,0xb0,0xb0,0xb0, + 0xc0,0xc0,0xc0,0xd0,0xd0,0xd0, + 0xe0,0xe0,0xe0,0xf0,0xf0,0xf0} +black={ + 0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00} + + +function palset(bnk,pal) + local curbnk=vbank() + vbank(bnk) + loadpal(pal) + vbank(curbnk) +end +function loadpal(pal) + for i=1,48 do + poke(0x3fc0+i-1,pal[i]) + end +end +function palmix(bnk,p1,p2,t) + local curbnk=vbank() + local pal={} + for i=1,#p1 do + pal[i]=lerp(p1[i],p2[i],t) + end + vbank(bnk) + loadpal(pal) + vbank(curbnk) +end +function slen(a) + return a[1]*a[1]+a[2]*a[2] +end +function clr(c1,c2) + local curbnk=vbank() + vbank(0) + cls(c1) + vbank(1) + cls(c2) + vbank(curbnk) +end +function subpix(i,a,f) + local p=peek4(i+f) + poke4(math.min(i-f,0x3fbf*2+1),math.max(p-a,0)) +end +function frnd(a,b,s) + return rnd(a*s,b*s)/s +end +function lerp(a, b, t) + return a + (b - a) * t +end + +function BOOT() + palset(0,cyan) +end + +tf=0 +tff=0 +frm=0 + + +function TIC() +mt=debug.getinfo(TIC) +txt=mt["source"]..mt["source"] + frm=frm+1 + t=time()/60000*(BPM/2)+(60000*BPM) + ft=time()/60000*BPM + fas=time()/60000*BPM*256 + ti=t//1 + tf=lerp(tf,ti,.8) + tff=lerp(tff,ft//1,.4) + b=fft(0,16)*3 + s=fft(32,128)*10 + h=fft(128,512) + vbank(1) + cls() + vbank(0) + palmix(0,cyan,orange,b/5) + for y=0,H do + for xx=0,W,STEP do + x=xx+frm%STEP + Y=y/H + X=x/W + f=ffts(x,x+x)*2+1+fft(x)*(x*.1) + f=max(0,min(15,f)) + if x=W/3 and xH/2-y then + pix(x,y,f+(tf+X)*7) + else + pix(x,y,15-f+(tf+Y)*6) + end + if rnd(100)<40+b*fft(Y)*100 then + vbank(1) + if c>H/2-y then + pix(x,y,f+(tf+X)*7) + else + pix(x,y,15-f+(tf+Y)*6) + end + end + end + end + vbank(1) + i=(fas//1%#txt)%#txt//2 + if fas//1%256<196 then + print(string.sub(txt,i,i+400),11,10,14*s) + print(string.sub(txt,i,i+400),10,10,1) + end +end + +function BDR(i) + local ii=abs(i-H/2)*(2+sin(tf/0.01)*1.5) + local ff=fft(ii) + local fs=ffts(ii) + local fl=fft(0,32) + vbank(0) + + palmix(1,orange,cyan,(fs*2-ff)*4) + poke(0x3ff9,rnd(-ff*4//1,fs*4//1)+fl*(H-i*i)*sin(fs)*.01) + if t%i==ff then + poke(0x3ff9+1,fs*10) + end + + vbank(1) + poke(0x3ff9,-rnd(-ff*4//1,fs*4//1)+fl*(H-i*i)*sin(fs)*.01) + + +end \ No newline at end of file diff --git a/public/shader_file_sources/2024_10_21_shader_jam_monday_night_bytes/totetmatt.glsl b/public/shader_file_sources/2024_10_21_shader_jam_monday_night_bytes/totetmatt.glsl new file mode 100644 index 00000000..889bd8c8 --- /dev/null +++ b/public/shader_file_sources/2024_10_21_shader_jam_monday_night_bytes/totetmatt.glsl @@ -0,0 +1,156 @@ +#version 420 core + +uniform float fGlobalTime; // in seconds +uniform vec2 v2Resolution; // viewport resolution (in pixels) +uniform float fFrameTime; // duration of the last frame, in seconds + +uniform sampler1D texFFT; // towards 0.0 is bass / lower freq, towards 1.0 is higher / treble freq +uniform sampler1D texFFTSmoothed; // this one has longer falloff and less harsh transients +uniform sampler1D texFFTIntegrated; // this is continually increasing +uniform sampler2D texPreviousFrame; // screenshot of the previous frame +uniform sampler2D texChecker; +uniform sampler2D texDR; +uniform sampler2D texNoise; +uniform sampler2D texTex1; +uniform sampler2D texTex2; +uniform sampler2D texTex3; +uniform sampler2D texTex4; + +layout(r32ui) uniform coherent uimage2D[3] computeTex; +layout(r32ui) uniform coherent uimage2D[3] computeTexBack; + +layout(location = 0) out vec4 out_color; // out_color must be written in order to see anything +float bpm = fGlobalTime*175/60; +vec3 erot(vec3 p,vec3 ax,float t){return mix(dot(ax,p)*ax,p,cos(t))+cross(ax,p)*sin(t);} +vec3 pcg3d(vec3 p){ + uvec3 q = floatBitsToUint(p)*1234567890u+12345678u; + q.x+=q.y*q.z;q.y+=q.x*q.z;q.z+=q.y*q.x; + q^=q>>16u; + q.x+=q.y*q.z;q.y+=q.x*q.z;q.z+=q.y*q.x; + return vec3(q)/float(-1U); +} +float cd( in vec3 p ) { + p = abs(p); + float d=0.,m; + for(int i=0;i++<3.;){ + d+=step(m=max(p.y,p.z),p.x)*m; + p = p.yzx; + } + return max(max(p.x,max(p.y,p.z))-3,1.-d); + } + // menger sponge fractal + float fractal( in vec3 p ) { + float s = 1.,d=0.; + for (int i=0;i<6;i++){ + d = max(d, cd(p)*s); + p = fract((p-1.)*.5)*6.-3.; + s /= 3.0; + } + return d; + } +vec3 sc1(vec2 uv){ + uv*=(5+4*atan(sin(bpm))); + uv = fract(uv)-.5; + float d = abs(uv.y)-.1-sqrt(texture(texFFTSmoothed,uv.x).r); + d= .01/(.001+abs(d)); + vec3 col =vec3(1.)*d; + return mix(col,1-col,exp(-4.*fract(bpm*2))); +} +vec3 sc2(vec2 uv){ + vec3 col = vec3(0.); + vec3 ro=vec3(0.,1.,-5.),rt=vec3(0.); + ro.z +=bpm; + rt.z +=bpm; + vec3 z = normalize(rt-ro),x=vec3(z.z,0.,z.x),y=cross(z,x); + vec3 rd= mat3(x,y,z)*erot(normalize(vec3(uv,1.)),vec3(0.,0.,1.),atan(sin(bpm*.125))*.5); + for(float i=0.,e=0.,g=0.;i++<50;){ + vec3 p= ro+rd*g; + float d = 0.; + vec4 pp=vec4(p,1.0); + for(float j=0.;j++<8;){ + + d += clamp(cos(pp.z)+sin(pp.x+pp.z*.1)+dot(sin(pp.xyz*.4),cos(p.yzx*2.)),-.1,.1)/pp.w; + pp*=1.1; + } + d/=pp.w; + float h = dot(p,vec3(0.,1.,0.))+d; + g+=e=max(.001,(h)); + col +=step(.1+sqrt(texture(texFFTSmoothed,p.z*.1).r),fract(pp.x))*vec3(1.)*(.01+.5*exp(10*-fract(p.z*.1+bpm*.25+.1*pcg3d(floor(pp.xyz*10)))))/exp(i*i*e); + } + return 1-col; + +} +vec3 sc3(vec2 uv){ + vec3 col = vec3(0.); + vec3 ro=vec3(0.,0.,-5.),rt=vec3(0.); + + ro=erot(ro,normalize(pcg3d(vec3(floor(bpm)))),.1); + ro.z -=bpm; + rt= erot(ro+vec3(.0,.0,1.13),normalize(vec3(.1,.2,.3)),fGlobalTime); + + vec3 z = normalize(rt-ro),x=vec3(z.z,0.,z.x),y=cross(z,x); + vec3 rd= mat3(x,y,z)*normalize(vec3(uv,1.)); + for(float i=0.,e=0.,g=0.;i++<50;){ + vec3 p= ro+rd*g; + + p= fract(p)-.5; + float h = min(min(length(p.yz),min(length(p.xy),length(p.xz))),length(p)-.1); + g+=e=max(.001,abs(h)); + col +=exp(-3.1*fract(bpm*.125+g*.5+vec3(.1,.2,.3)))*.5/exp(i*i*e); + } + return col; + + } + + vec3 sc4(vec2 uv){ + vec3 col = vec3(0.); + vec3 ro=vec3(0.,0.,-15.),rt=vec3(0.); + ro= erot(ro,normalize(vec3(0.,1.,1.)),bpm); + + + + vec3 z = normalize(rt-ro),x=vec3(z.z,0.,z.x),y=cross(z,x); + vec3 rd= mat3(x,y,z)*normalize(vec3(uv,1.)); + for(float i=0.,e=0.,g=0.;i++<50;){ + vec3 p= ro+rd*g; + + + float h = fractal(p); + g+=e=max(.001,abs(h)); + col +=vec3(1.,.5,.2)*(.05*exp(-3*fract(bpm+floor(length(floor(p*10)))*.1)))/exp(i*i*e); + } + return col; + + } +void main(void) +{ + vec2 uv = vec2(gl_FragCoord.x / v2Resolution.x, gl_FragCoord.y / v2Resolution.y); + uv -= 0.5; + uv /= vec2(v2Resolution.y / v2Resolution.x, 1); + vec2 ouv = uv; + vec3 col = vec3(0.); + + float fbpm = floor(bpm*2.); + float sq = mod(fbpm,4.); + vec3 subscreenRnd = pcg3d(vec3(fbpm)); + float screenRatio = v2Resolution.y/v2Resolution.x; +vec2 subscreenSize = vec2(1.,screenRatio); + uv -=(max(vec2(.05),subscreenRnd.xy)-.5)*1.; +uv /=max(.1,subscreenRnd.z); + uv = erot(uv.xyy,vec3(0.,0.,1.),tanh(sin(floor(fbpm*3.3)))).xy; + if(sq <1.) col = sc2(uv); + else if(sq<2.) col += sc3(uv); + else if(sq<3.) col += sc1(uv); + else if(sq<4.) col += sc4(uv); + + col +=step(.95,abs(uv.x))+step(.45,abs(uv.y)); + ivec2 gl = ivec2( gl_FragCoord.xy); + vec3 pcol = texelFetch(texPreviousFrame,gl,0).rgb; + ouv.y+=.001*sin(ouv.x*2030); + ouv.x+=sign(sin(uv.y*5))*tan(bpm*.1); + ouv/=(1.00-.1*exp(-3*fract(bpm))+0*sin(subscreenRnd.x+ouv.y*1000)*.1); + pcol = texture(texPreviousFrame,(ouv*vec2(v2Resolution.y / v2Resolution.x, 1))+.5).gbr; + col = mix(pcol*.7,col,.9*step(abs(uv.y),subscreenSize.y)*step(abs(uv.x),subscreenSize.x)); + col = mix(col,.05/col,exp(-10.*fract(bpm+.5))); + out_color = vec4(col,1.); +} \ No newline at end of file