bind any number of textures (i'm unstoppable)

This commit is contained in:
2025-09-19 00:22:22 +02:00
parent 1cf3c7eb50
commit f3ee854de0
8 changed files with 30 additions and 28 deletions
+1
View File
@@ -22,6 +22,7 @@ uniform sampler2D tex4;
uniform sampler2D tex5;
uniform sampler2D tex6;
uniform sampler2D tex7;
uniform sampler2D tex8;
// 3. definitions
// --------------
+1 -1
View File
@@ -8,5 +8,5 @@ in vec2 vUV;
out vec4 fragColor;
void main() {
fragColor = fx_stage(vUV, tex7, tex0);
fragColor = fx_stage(vUV, tex8, tex0);
}
+3 -2
View File
@@ -18,6 +18,7 @@ void main() {
fragColor += s(uv,0,1) * texture(tex4, uv);
fragColor += s(uv,1,1) * texture(tex5, uv);
fragColor += s(uv,2,1) * texture(tex6, uv);
fragColor += s(uv,0.5,0) * texture(tex7, uv-vec2(0.5,0));
fragColor += s(uv,1.5,0) * texture(tex0, uv-vec2(0.5,0));
fragColor += s(uv,0,0) * texture(tex7, uv);
fragColor += s(uv,1,0) * texture(tex8, uv);
fragColor += s(uv,2,0) * texture(tex0, uv);
}
+4 -1
View File
@@ -2,6 +2,9 @@ UNIFORM_TIME=iTime
UNIFORM_TEMPO=iTempo
UNIFORM_FPS=iFPS
UNIFORM_RESOLUTION=iResolution
UNIFORM_TEX_PREFIX=tex
TEX_COUNT=9
FRAG_COUNT=8
FRAG_OUTPUT=7
@@ -10,7 +13,7 @@ FRAG_1_OUT=2
FRAG_2_OUT=5
FRAG_3_OUT=3
FRAG_4_OUT=6
FRAG_5_OUT=7
FRAG_5_OUT=8
FRAG_6_OUT=0
SUB_TYPE_COUNT=3