subroutines test

This commit is contained in:
2025-09-16 23:11:19 +02:00
parent 64ce067e4e
commit 1fb48da6f8
10 changed files with 196 additions and 48 deletions
+5 -9
View File
@@ -1,16 +1,12 @@
// SRC A
// ---------
// IN: 0 / 1
// OUT: 3
// -----------
// IN: 0 (MFX)
// IN: 1 (IN A)
// OUT: 3 (FX A)
in vec2 vUV;
layout(location = 3) out vec3 fragColor;
void main() {
vec2 uv0 = vUV.st;
float ratio = iResolution.x / iResolution.y;
vec2 uv1 = (uv0 - .5) * vec2(ratio, 1);
vec3 color = vec3(vUV, sin(iTime * 0.5) * 0.5 + 0.5);
color *= 1 - step(cos(iTime) * 0.1 + 0.4, length(uv1));
fragColor = color + texture(frame0, vUV - 0.01).xyz * 0.5;
fragColor = src_stage(vUV);
}