Skip to content

Commit 677ecb4

Browse files
committed
eulerroom jon&dok&tot
1 parent d2bbc22 commit 677ecb4

5 files changed

Lines changed: 355 additions & 0 deletions

File tree

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"title": "Eulerroom",
3+
"started": "2025-11-22",
4+
"date": "22 November 2025",
5+
"type": "Shader Jam",
6+
"website": "https://eulerroom.com/",
7+
"flyer": "",
8+
"vod":null,
9+
"software_used": [
10+
{
11+
"name": "Bonzomatic",
12+
"url": "https://github.com/wrightwriter/Bonzomatic-Compute/releases/tag/v1.0.1",
13+
"version": "Wrighter Compute - v1",
14+
"purpose": "Graphic"
15+
},
16+
{
17+
"name": "Bonz",
18+
"url": "https://sr.ht/~jmaselbas/bonz/",
19+
"version": "",
20+
"purpose": "Graphic & Audio"
21+
}
22+
23+
],
24+
"phases": [
25+
{
26+
"title": null,
27+
"vod": null,
28+
"entries": [
29+
{
30+
"id": null,
31+
"rank": null,
32+
"points": null,
33+
"handle": {
34+
"name": "dok",
35+
"demozoo_id": 142108
36+
},
37+
"shadertoy_url": null,
38+
"preview_image": "2025_11_22_shader_jam_eulerroom/grabber_eulerroom_dok.jpg",
39+
"source_file": "/shader_file_sources/2025_11_22_shader_jam_eulerroom/grabber_eulerroom_dok.glsl"
40+
},
41+
{
42+
"id": null,
43+
"rank": null,
44+
"points": null,
45+
"handle": {
46+
"name": "totetmatt",
47+
"demozoo_id": 121811
48+
},
49+
"shadertoy_url": null,
50+
"preview_image": "2025_11_22_shader_jam_eulerroom/sender_eulerroom_tot.jpg",
51+
"source_file": "/shader_file_sources/2025_11_22_shader_jam_eulerroom/sender_eulerroom_tot.glsl"
52+
}
53+
],
54+
"staffs": [
55+
{
56+
"handle": {
57+
"name": "jon",
58+
"demozoo_id": 142107
59+
},
60+
"job": "Live"
61+
}
62+
]
63+
}
64+
],
65+
"staffs": [
66+
67+
],
68+
"demozoo_party_id": null
69+
}
322 KB
Loading
200 KB
Loading
Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
#version 420 core
2+
3+
uniform float fGlobalTime; // in seconds
4+
uniform vec2 v2Resolution; // viewport resolution (in pixels)
5+
uniform float fFrameTime; // duration of the last frame, in seconds
6+
uniform sampler1D texFFT; // towards 0.0 is bass / lower freq, towards 1.0 is higher / treble freq
7+
uniform sampler1D texFFTSmoothed; // this one has longer falloff and less harsh transients
8+
uniform sampler1D texFFTIntegrated; // this is continually increasing
9+
uniform sampler2D texPreviousFrame; // screenshot of the previous frame
10+
uniform sampler2D texTex1;
11+
uniform sampler2D texTex2;
12+
uniform sampler2D texTex3;
13+
uniform sampler2D texTex4;
14+
layout(location = 0) out vec4 out_color; // out_color must be written in order to see anything
15+
#define time fGlobalTime
16+
17+
float sd_box(vec3 p, vec3 e)
18+
{
19+
p = abs(p)-e;
20+
return length(max(p,0)) + min(0,max(p.x,max(p.y,p.z)));
21+
}
22+
23+
const float bpm=142/60;
24+
vec4 s = time*bpm/vec4(1,4,8,16),t=fract(s);
25+
#define r2(a) mat2(cos(a),-sin(a),sin(a),cos(a))
26+
const float pi = acos(-1);
27+
#define sin2(x) (.5+.5*sin(x))
28+
29+
uint hash(uint x){
30+
const uint c = int((1.-sqrt(5)/2)*-1u)|1;
31+
x ^= x >> 16;
32+
x *= c;
33+
x ^= x >> 15;
34+
x *= c;
35+
x ^= x >> 16;
36+
return x;
37+
}
38+
39+
uint rnd(ivec3 p)
40+
{
41+
return hash(hash(hash(p.x)+p.y)+p.z);
42+
}
43+
44+
float rnd(vec2 p)
45+
{
46+
return hash(floatBitsToUint(p.y)+hash(floatBitsToUint(p.x)))/float(-1u);
47+
}
48+
49+
vec3 rnd3(float v)
50+
{
51+
uint x = hash(floatBitsToUint(v));
52+
uint y = hash(x+floatBitsToUint(v));
53+
uint z = hash(y+floatBitsToUint(v));
54+
return vec3(x,y,z)/float(-1u);
55+
}
56+
uint seed = 1;
57+
float rnd(float x)
58+
{
59+
return rnd(ivec3(seed+++floatBitsToUint(x), gl_FragCoord.xy))/float(-1u);
60+
}
61+
vec3 rndunit(float x) {
62+
return normalize(tan(rnd3(x)*2.-1.));
63+
}
64+
vec3 erot(vec3 p, vec3 x, float a)
65+
{
66+
return mix(dot(x,p)*x,p, cos(a))+cross(x,p)*sin(a);
67+
}
68+
69+
vec2 sdf(vec3 p) {
70+
vec2 r=vec2(1e9,0);
71+
{
72+
float d;
73+
vec3 q = p;
74+
75+
q = erot(q, normalize(vec3(1,1,0)), pi*(floor(s.x/2.0)+pow(fract(s.x/2.0),.5)));
76+
q.xz *= r2(pi*s.w);
77+
q.xz -= clamp(round(q.xz/4),-2,2)*4;
78+
79+
q.y = abs(q.y)-2.;
80+
q.xz *= r2(q.y*pi*mix(0.1,0.25,t.z));
81+
82+
q.xy *= r2(0.125*pi);
83+
q.zy *= r2(-0.15*pi);
84+
85+
float dy= 20*pow(t.y,.5);
86+
d = sd_box(q,vec3(.5,4.*t.x,.5));
87+
if (d < r.x) { r.x = d; r.y = 1; }
88+
}
89+
if (false)
90+
{
91+
vec3 q = p.yxz;
92+
float d = 1e9;
93+
94+
q = erot(q, normalize(vec3(1,1,0)), pi*(floor(s.x/2.0)+pow(fract(s.x/2.0),.5)));
95+
q.xz *= r2(pi*s.w);
96+
97+
q.y = abs(q.y)-2.;
98+
q.xz *= r2(q.y*pi*mix(0.1,0.25,t.z));
99+
100+
q.xy *= r2(0.5*pi);
101+
d = sd_box(q,vec3(.2,10.,.2));
102+
if (d < r.x) { r.x = d; r.y = 2; }
103+
}
104+
return r;
105+
}
106+
107+
vec3 nrm(vec3 p)
108+
{
109+
vec2 e = vec2(1,-1);
110+
float h = 5e-3;
111+
return normalize(
112+
e.xyy*sdf(p+e.xyy*h).x+
113+
e.yxy*sdf(p+e.yxy*h).x+
114+
e.yyx*sdf(p+e.yyx*h).x+
115+
e.xxx*sdf(p+e.xxx*h).x
116+
);
117+
}
118+
119+
void main(void)
120+
{
121+
vec2 uv = vec2(gl_FragCoord.x / v2Resolution.x, gl_FragCoord.y / v2Resolution.y);
122+
vec2 tv = uv;
123+
uv -= 0.5;
124+
uv /= vec2(v2Resolution.y / v2Resolution.x, 1);
125+
vec3 col = vec3(0);
126+
float fv = .5;
127+
vec3 at = vec3(0,0,0);
128+
vec3 ro = vec3(0,0,4);
129+
130+
fv = mix(0.1,0.5,pow(t.y,0.25));
131+
fv += pow(t.x,.4)*0.2;
132+
vec3 cz = normalize(at-ro),
133+
cx=normalize(cross(cz,vec3(0,1,0))),
134+
cy=normalize(cross(cz,cx)),rd;
135+
float j,i,h, d, r;
136+
vec3 p;
137+
float si = 1;
138+
vec3 _ro = ro;
139+
140+
for (j=0;j<2;j++) {
141+
rd=mat3(cx,cy,cz)*normalize(vec3(uv+.001*vec2(rnd(j+time),rnd(j-time)),fv));
142+
ro=_ro;
143+
for (i=0,r=0,h=4; i<64; i++) {
144+
p = rd*r+ro;
145+
vec2 rr = sdf(p);
146+
rr.x *= (1.-rnd(time)*.2);
147+
r+=d=rr.x*.9;
148+
if (d<1e-3 && rr.y ==1 && h-->0){
149+
vec3 n = nrm(p=rd*r+ro);
150+
rd = mix(reflect(rd, -n), rndunit(p.x+p.y+p.z),.03);
151+
ro = p + .1*n;
152+
r = 0;
153+
continue;
154+
}
155+
if (d<1e-3 ||r>1e3)break;
156+
}
157+
col.r += i/64;
158+
}
159+
col.r = pow(col.r/j + (rnd(time)+rnd(time))/64., 1.2);
160+
col.r = pow(col.r,mix(2.,1.5,t.x));
161+
col.rgb = col.rrr;
162+
163+
{
164+
vec3 pre = texture(texPreviousFrame, .5+(tv-.5)*.99).rgb;
165+
col = mix(pre, col, .99*pow(t.x,.5));
166+
}
167+
168+
{
169+
vec2 id = floor(tv*100.0);
170+
vec3 pre = texture(texPreviousFrame, .5+(id/100.0-.5)).rgb;
171+
col = mix(pre, col, step(0.2,rnd(id.x+rnd(id.y))));
172+
}
173+
174+
out_color = vec4(col, 1);
175+
}
176+
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
#version 420 core
2+
3+
uniform float fGlobalTime; // in seconds
4+
uniform vec2 v2Resolution; // viewport resolution (in pixels)
5+
uniform float fFrameTime; // duration of the last frame, in seconds
6+
7+
uniform sampler1D texFFT; // towards 0.0 is bass / lower freq, towards 1.0 is higher / treble freq
8+
uniform sampler1D texFFTSmoothed; // this one has longer falloff and less harsh transients
9+
uniform sampler1D texFFTIntegrated; // this is continually increasing
10+
uniform sampler2D texPreviousFrame; // screenshot of the previous frame
11+
uniform sampler2D texChecker;
12+
uniform sampler2D texNoise;
13+
uniform sampler2D texRevision;
14+
uniform sampler2D texSessions;
15+
uniform sampler2D texSessionsShort;
16+
uniform sampler2D texTex1;
17+
uniform sampler2D texTex2;
18+
uniform sampler2D texTex3;
19+
uniform sampler2D texTex4;
20+
21+
layout(r32ui) uniform coherent uimage2D[3] computeTex;
22+
layout(r32ui) uniform coherent uimage2D[3] computeTexBack;
23+
24+
layout(location = 0) out vec4 out_color; // out_color must be written in order to see anything
25+
#define PI 3.141592
26+
27+
mat2 rot(float a){float c=cos(a),s=sin(a);return mat2(c,-s,s,c);}
28+
float pModPolar(inout vec2 p, float repetitions) {
29+
float angle = 2*PI/repetitions;
30+
float a = atan(p.y, p.x) + angle/2.;
31+
float r = length(p);
32+
float c = floor(a/angle);
33+
a = mod(a,angle) - angle/2.;
34+
p = vec2(cos(a), sin(a))*r;
35+
// For an odd number of repetitions, fix cell index of the cell in -x direction
36+
// (cell index would be e.g. -5 and 5 in the two halves of the cell):
37+
if (abs(c) >= (repetitions/2)) c = abs(c);
38+
return c;
39+
}
40+
float circle(vec2 uv,float s){
41+
return length(uv)-s;
42+
}
43+
float box(vec2 p,vec2 b){p=abs(p)-b;return length(max(vec2(0),p))+min(0.,max(p.x,p.y));}
44+
45+
vec3 hash3d(vec3 p){
46+
uvec3 q= floatBitsToUint(p);
47+
q += ((q>>16u)^q.yzx)*1111111111u;
48+
q += ((q>>16u)^q.yzx)*1111111111u;
49+
q += ((q>>16u)^q.yzx)*1111111111u;
50+
return vec3(q)/float(-1U);
51+
}
52+
float triangle( in vec2 p, in float r )
53+
{
54+
const float k = sqrt(3.0);
55+
p.x = abs(p.x) - r;
56+
p.y = p.y + r/k;
57+
if( p.x+k*p.y>0.0 ) p = vec2(p.x-k*p.y,-k*p.x-p.y)/2.0;
58+
p.x -= clamp( p.x, -2.0*r, 0.0 );
59+
return -length(p)*sign(p.y);
60+
}
61+
float diam(vec2 p,float s){p=abs(p);return (p.x+p.y-s)*inversesqrt(3);}
62+
float bpm = fGlobalTime*142/60;
63+
void main(void)
64+
{
65+
vec2 uv = vec2(gl_FragCoord.x / v2Resolution.x, gl_FragCoord.y / v2Resolution.y);
66+
uv -= 0.5;
67+
uv /= vec2(v2Resolution.y / v2Resolution.x, 1);
68+
69+
uv*=5.;
70+
vec3 col = vec3(0.);
71+
72+
uv *=rot(bpm*.125);
73+
uv.xy += bpm*.5+ (hash3d(vec3(floor(bpm),-1U,123456)).xy-.5)*2*exp(-3*fract(bpm));
74+
vec2 id = floor(uv);
75+
vec3 rnd = hash3d(vec3(id,-1U));
76+
77+
if(rnd.z <.5){
78+
uv*=2.;
79+
id = floor(uv);
80+
rnd = hash3d(vec3(id,-1U));
81+
}
82+
uv = uv-id-.5;
83+
uv *= 1-exp(-3*fract(bpm*.5+rnd.x));
84+
float d = rnd.x<rnd.y ? circle(uv,.25): (rnd.y<rnd.z? triangle(uv,.25):box(uv,vec2(.25)));
85+
86+
float f=(texture(texFFTIntegrated,mix(.01,.5,fract(length(rnd)))).r);
87+
f= .01+exp(-6*fract(f*4))*.5;
88+
d = f/(f+abs(d));
89+
col = vec3(1.)*d;
90+
if(rnd.x<.5){
91+
col = mix(vec3(0),vec3(1,0,0),col);
92+
} else if(rnd.y<.5) {
93+
col = mix(vec3(0,.5,0),vec3(0,.0,0),col);
94+
}
95+
96+
ivec2 gl = ivec2(gl_FragCoord.xy);
97+
vec3 pcol = vec3(
98+
texelFetch(texPreviousFrame,gl,0).r,
99+
100+
texelFetch(texPreviousFrame,gl,0).g,
101+
102+
texelFetch(texPreviousFrame,gl,0).b
103+
);
104+
105+
col = mix(col,pcol,.5);
106+
107+
108+
109+
out_color = vec4(col,1.);
110+
}

0 commit comments

Comments
 (0)