-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
729 additions
and
0 deletions.
There are no files selected for viewing
118 changes: 118 additions & 0 deletions
118
public/data/2024_10_21_shader_jam_monday_night_bytes.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
142 changes: 142 additions & 0 deletions
142
public/shader_file_sources/2024_10_21_shader_jam_monday_night_bytes/catnip.glsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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.); | ||
} |
137 changes: 137 additions & 0 deletions
137
public/shader_file_sources/2024_10_21_shader_jam_monday_night_bytes/jtruk.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 r<d.life/mult then | ||
local px=ox%NX | ||
local py=oy%NY | ||
V[py][px]=V[py][px]+S((d.life/mult-r)/MAX_LIFE)*.5 | ||
end | ||
end | ||
end | ||
|
||
d.life=d.life+.1 | ||
end | ||
end | ||
end | ||
|
||
function draw() | ||
for y=0,NY-1 do | ||
for x=0,NX-1 do | ||
local v=V[y][x] | ||
if v>0 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 |
Oops, something went wrong.