src 14 : cursor

This commit is contained in:
2025-11-09 22:50:09 +01:00
parent 71189f58ff
commit 916c816102
3 changed files with 27 additions and 8 deletions
+3 -3
View File
@@ -90,13 +90,13 @@ make -f Makefile.dev release-arch
- [x] src 10 : isometric grid
- [x] src 12 : pattern in my kitchen
- [x] src 13 : another pattern in my kitchen
- [ ] src 14 : cursor with select
- [ ] src 15 : ?
- [x] src 14 : cursor with select
- [ ] src 15 : random source
- [x] fx 11 : spill
- [x] fx 12 : game of life
- [x] fx 13 : sobel
- [ ] fx 14 : colorize range (pretty color ranges)
- [ ] fx 15 : ?
- [ ] fx 15 : random fx
- [x] frag 10 : move debug screen here
- [ ] debug : add src/fx/A/B indicators
- [ ] Other
+2 -2
View File
@@ -154,8 +154,8 @@ options:
| **3** | **A** | Video In 2 + Thru | _Hue_ | _Saturation_ | _Light_ | Spill | _Bottom limit_ | _Top Limit_ | _Rotation_ |
| | **B** | Scales | _Zoom_ | _Shape_ | _Ripples_ | Game Of Life | _Pixel Size_ | _Ruleset/Threshold_ | _Feedback_ |
| | **C** | Credenza | _Zoom_ | _Shape_ | _Ripples_ | Sobel Filter | _Horz. filter_ | _Vert. filter_ | _Filter Size_ |
| | **D** | (same as 7) | | | | (same as 0) | | | |
| | **E** | (same as 8) | | | | (same as 1) | | | |
| | **D** | Cursor | _Size_ | _Pos X_ | _Pos Y_ | (same as 0) | | | |
| | **E** | (Random source) | --- | --- | --- | (Random effect) | --- | --- | --- |
TODO update
+22 -3
View File
@@ -421,10 +421,9 @@ subroutine(src_stage_sub) vec4 src_13(vec2 vUV, int seed, vec3 b1, vec2 f1, vec3
return vec4(f);
}
// TODO SRC 14
// SRC 14 : Cursor
subroutine(src_stage_sub) vec4 src_14(vec2 vUV, int seed, vec3 b1, vec2 f1, vec3 b2, vec2 f2, vec3 b3, vec2 f3)
{
return src_8(vUV, seed, b1, f1, b2, f2, b3, f3);
// start
vec2 uv0 = vUV.st;
@@ -433,9 +432,29 @@ subroutine(src_stage_sub) vec4 src_14(vec2 vUV, int seed, vec3 b1, vec2 f1, vec3
// controls
float size = magic(f1, b1, seed + 10) * 2 + 0.1;
float dx = (magic(f2, b2, seed + 20) * (1 - size * 0.06) - 0.5) * ratio;
float dy = magic(f3, b3, seed + 30) * (1 - size * 0.17) - 0.5;
// logic
vec2 uv2 = uv1;
uv2 -= vec2(dx, -dy);
uv2 /= size;
uv2 *= -rot(-PI / 2);
float f = istep(0, (uv2.x * 2 + uv2.y) * (uv2.x * 2 - uv2.y)) * istep(0, uv2.y);
uv2.y += 0.1;
f -= istep(0, (uv2.x + uv2.y * 3) * (uv2.x - uv2.y * 3)) * istep(0, uv2.y);
f += rect(uv2, vec2(0, -0.04), vec2(0.01, 0.04));
return texture(iTex0, vUV);
return vec4(f);
}
// TODO SRC 15