From 2a2460416dbe3a753fa6bb682ba5029570e1cd19 Mon Sep 17 00:00:00 2001 From: klemek Date: Sun, 8 Nov 2026 18:14:21 +0100 Subject: [PATCH] feat: lab utilites and fix --- lab/forge_project.cfg | 4 ++-- lab/frag1.example.glsl | 2 -- lab/frag3.example.glsl | 11 +++++++++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/lab/forge_project.cfg b/lab/forge_project.cfg index 1c27c7b..72b6b30 100644 --- a/lab/forge_project.cfg +++ b/lab/forge_project.cfg @@ -83,7 +83,7 @@ TAP_TEMPO=46 # === GROUP INPUT STATES GROUP_COUNT=3 -GROUP_1_COUNT=1 +GROUP_1_COUNT=6 GROUP_1_1_X=33 GROUP_1_1_Y=49 GROUP_1_1_Z=65 @@ -103,7 +103,7 @@ GROUP_1_6_X=3 GROUP_1_6_Y=19 GROUP_1_6_Z= -GROUP_2_COUNT=1 +GROUP_2_COUNT=7 GROUP_2_1_X=37 GROUP_2_1_Y=53 GROUP_2_1_Z=69 diff --git a/lab/frag1.example.glsl b/lab/frag1.example.glsl index 05ef345..e225cbd 100644 --- a/lab/frag1.example.glsl +++ b/lab/frag1.example.glsl @@ -26,8 +26,6 @@ vec4 src_stage(vec2 vUV, int seed, vec3 b1, vec2 f1, vec3 b2, vec2 f2, vec3 b3, // logic - // logic - vec3 c = vec3(uv1.x, uv1.y, cos(iBeats) * 0.5 + 0.5); // output diff --git a/lab/frag3.example.glsl b/lab/frag3.example.glsl index 7f9ae21..fd56f1c 100644 --- a/lab/frag3.example.glsl +++ b/lab/frag3.example.glsl @@ -1,10 +1,17 @@ #version 460 +#include inc_write.glsl + in vec2 vUV; out vec4 fragColor; uniform sampler2D iTex0; +uniform int iFPS; void main() { - fragColor = texture(iTex0, vUV); -} \ No newline at end of file + vec4 color = texture(iTex0, vUV); + + color = mix(color, 1. - color, write_int_left(vUV * 20., vec2(1., 1.), min(120, iFPS), 3)); + + fragColor = color; +}