wip
This commit is contained in:
+55
-60
@@ -16,12 +16,8 @@ vec4 fx_master(vec3 c0, vec3 c, int seed, vec3 m0) {
|
||||
return vec4(c_out, 1.0);
|
||||
}
|
||||
|
||||
subroutine vec4 fx_stage_sub(vec2 vUV, sampler2D previous, sampler2D feedback, int seed, vec3 b1, vec2 f1, vec3 b2, vec2 f2, vec3 b3, vec2 f3, vec3 m0);
|
||||
|
||||
subroutine uniform fx_stage_sub fx_stage;
|
||||
|
||||
// FX 1 : thru
|
||||
subroutine(fx_stage_sub) vec4 fx_1(vec2 vUV, sampler2D previous, sampler2D feedback, int seed, vec3 b1, vec2 f1, vec3 b2, vec2 f2, vec3 b3, vec2 f3, vec3 m0)
|
||||
vec4 fx_1(vec2 vUV, sampler2D previous, sampler2D feedback, int seed, vec3 b1, vec2 f1, vec3 b2, vec2 f2, vec3 b3, vec2 f3, vec3 m0)
|
||||
{
|
||||
// start
|
||||
|
||||
@@ -39,7 +35,7 @@ subroutine(fx_stage_sub) vec4 fx_1(vec2 vUV, sampler2D previous, sampler2D feedb
|
||||
vec3 c = c0;
|
||||
c = shift3(c, hue);
|
||||
c *= 1 + saturation;
|
||||
c = mix(c + light * 2.0, c - (1 - light) * 2.0, step(0.5, light));
|
||||
c = mix(c + light * 2.0, c - (1 - light) * 2.0, step(.5, light));
|
||||
|
||||
return fx_master(c0, c, seed, m0);
|
||||
}
|
||||
@@ -64,26 +60,26 @@ vec4 fx_shift(vec2 vUV, sampler2D src0, sampler2D src1, int seed, vec3 b1, vec2
|
||||
vec3 c0 = texture(src0, uv0).xyz;
|
||||
|
||||
vec2 uv2 = uv1;
|
||||
uv2 = mix(uv2 * (1 + zoom * 2), uv2 * (zoom), step(0.5, zoom));
|
||||
uv2 = mix(uv2 * (1 + zoom * 2), uv2 * (zoom), step(.5, zoom));
|
||||
uv2 += vec2(x_shift * ratio, y_shift) * 2;
|
||||
vec3 c = reframe(src1, uv2).xyz;
|
||||
|
||||
return fx_master(c0, c, seed, m0);
|
||||
}
|
||||
|
||||
subroutine(fx_stage_sub) vec4 fx_2(vec2 vUV, sampler2D previous, sampler2D feedback, int seed, vec3 b1, vec2 f1, vec3 b2, vec2 f2, vec3 b3, vec2 f3, vec3 m0)
|
||||
vec4 fx_2(vec2 vUV, sampler2D previous, sampler2D feedback, int seed, vec3 b1, vec2 f1, vec3 b2, vec2 f2, vec3 b3, vec2 f3, vec3 m0)
|
||||
{
|
||||
return fx_shift(vUV, previous, feedback, seed, b1, f1, b2, f2, b3, f3, m0);
|
||||
}
|
||||
|
||||
// FX 3 : shift
|
||||
subroutine(fx_stage_sub) vec4 fx_3(vec2 vUV, sampler2D previous, sampler2D feedback, int seed, vec3 b1, vec2 f1, vec3 b2, vec2 f2, vec3 b3, vec2 f3, vec3 m0)
|
||||
vec4 fx_3(vec2 vUV, sampler2D previous, sampler2D feedback, int seed, vec3 b1, vec2 f1, vec3 b2, vec2 f2, vec3 b3, vec2 f3, vec3 m0)
|
||||
{
|
||||
return fx_shift(vUV, previous, previous, seed, b1, f1, b2, f2, b3, f3, m0);
|
||||
}
|
||||
|
||||
// FX 4 : colorize
|
||||
subroutine(fx_stage_sub) vec4 fx_4(vec2 vUV, sampler2D previous, sampler2D feedback, int seed, vec3 b1, vec2 f1, vec3 b2, vec2 f2, vec3 b3, vec2 f3, vec3 m0)
|
||||
vec4 fx_4(vec2 vUV, sampler2D previous, sampler2D feedback, int seed, vec3 b1, vec2 f1, vec3 b2, vec2 f2, vec3 b3, vec2 f3, vec3 m0)
|
||||
{
|
||||
// start
|
||||
|
||||
@@ -109,7 +105,7 @@ subroutine(fx_stage_sub) vec4 fx_4(vec2 vUV, sampler2D previous, sampler2D feedb
|
||||
}
|
||||
|
||||
// FX 5 : quantize
|
||||
subroutine(fx_stage_sub) vec4 fx_5(vec2 vUV, sampler2D previous, sampler2D feedback, int seed, vec3 b1, vec2 f1, vec3 b2, vec2 f2, vec3 b3, vec2 f3, vec3 m0)
|
||||
vec4 fx_5(vec2 vUV, sampler2D previous, sampler2D feedback, int seed, vec3 b1, vec2 f1, vec3 b2, vec2 f2, vec3 b3, vec2 f3, vec3 m0)
|
||||
{
|
||||
// start
|
||||
|
||||
@@ -131,18 +127,18 @@ subroutine(fx_stage_sub) vec4 fx_5(vec2 vUV, sampler2D previous, sampler2D feedb
|
||||
vec2 uv2 = uv1;
|
||||
float pixel = (1 - pixel_size) * 250 + 25;
|
||||
uv2 = round(uv2 * pixel) / pixel;
|
||||
vec3 c = gauss(previous, uv2 * vec2(1 / ratio, 1) + .5, 3, 0.005 * blur).xyz;
|
||||
vec3 c = gauss(previous, uv2 * vec2(1 / ratio, 1) + .5, 3, .005 * blur).xyz;
|
||||
float colors = (1 - quantize) * 10 + 1;
|
||||
if (quantize_trigger) {
|
||||
c = round(c * colors) / colors;
|
||||
}
|
||||
// c = mix(c, 1 - c, step(noise_f(uv0 * 10 + vec2(iTime * 0.1, 0), 5), 0.5));
|
||||
// c = mix(c, 1 - c, step(noise_f(uv0 * 10 + vec2(iTime * .1, 0), 5), .5));
|
||||
|
||||
return fx_master(c0, c, seed, m0);
|
||||
}
|
||||
|
||||
// FX 6 : dithering
|
||||
subroutine(fx_stage_sub) vec4 fx_6(vec2 vUV, sampler2D previous, sampler2D feedback, int seed, vec3 b1, vec2 f1, vec3 b2, vec2 f2, vec3 b3, vec2 f3, vec3 m0)
|
||||
vec4 fx_6(vec2 vUV, sampler2D previous, sampler2D feedback, int seed, vec3 b1, vec2 f1, vec3 b2, vec2 f2, vec3 b3, vec2 f3, vec3 m0)
|
||||
{
|
||||
// start
|
||||
|
||||
@@ -168,7 +164,7 @@ subroutine(fx_stage_sub) vec4 fx_6(vec2 vUV, sampler2D previous, sampler2D feedb
|
||||
if (pixel_size_trigger) {
|
||||
uv2 = floor(uv2 * k1) / k1;
|
||||
}
|
||||
vec3 c = gauss(previous, uv2 * vec2(1 / ratio, 1) + .5, 3, 0.005 * blur).xyz;
|
||||
vec3 c = gauss(previous, uv2 * vec2(1 / ratio, 1) + .5, 3, .005 * blur).xyz;
|
||||
float k3 = pow(2, 5 - floor(quantize * 5));
|
||||
if (quantize_trigger) {
|
||||
c *= k3;
|
||||
@@ -184,7 +180,7 @@ subroutine(fx_stage_sub) vec4 fx_6(vec2 vUV, sampler2D previous, sampler2D feedb
|
||||
}
|
||||
|
||||
// FX 7 : tv
|
||||
subroutine(fx_stage_sub) vec4 fx_7(vec2 vUV, sampler2D previous, sampler2D feedback, int seed, vec3 b1, vec2 f1, vec3 b2, vec2 f2, vec3 b3, vec2 f3, vec3 m0)
|
||||
vec4 fx_7(vec2 vUV, sampler2D previous, sampler2D feedback, int seed, vec3 b1, vec2 f1, vec3 b2, vec2 f2, vec3 b3, vec2 f3, vec3 m0)
|
||||
{
|
||||
// start
|
||||
|
||||
@@ -203,13 +199,13 @@ subroutine(fx_stage_sub) vec4 fx_7(vec2 vUV, sampler2D previous, sampler2D feedb
|
||||
vec3 c0 = texture(previous, uv0).xyz;
|
||||
|
||||
vec2 uv2 = uv1;
|
||||
float k1 = lens_v * 0.5;
|
||||
float k1 = lens_v * .5;
|
||||
uv2 *= 1 + zoom * 2;
|
||||
uv2 = lens(uv2, -k1, k1);
|
||||
float k = horizontal_noise;
|
||||
vec3 c = vec3(
|
||||
reframe_b(previous, uv2 + vec2((rand(uv0.y * 1000 + iTime) - 0.5) * k * 0.1)).x,
|
||||
reframe_b(previous, uv2 + vec2((rand(uv0.y * 1100 + iTime) - 0.5) * k * 0.1)).y,
|
||||
reframe_b(previous, uv2 + vec2((rand(uv0.y * 1000 + iTime) - .5) * k * .1)).x,
|
||||
reframe_b(previous, uv2 + vec2((rand(uv0.y * 1100 + iTime) - .5) * k * .1)).y,
|
||||
reframe_b(previous, uv2).z
|
||||
);
|
||||
|
||||
@@ -217,7 +213,7 @@ subroutine(fx_stage_sub) vec4 fx_7(vec2 vUV, sampler2D previous, sampler2D feedb
|
||||
}
|
||||
|
||||
// FX 8 : kaleidoscope
|
||||
subroutine(fx_stage_sub) vec4 fx_8(vec2 vUV, sampler2D previous, sampler2D feedback, int seed, vec3 b1, vec2 f1, vec3 b2, vec2 f2, vec3 b3, vec2 f3, vec3 m0)
|
||||
vec4 fx_8(vec2 vUV, sampler2D previous, sampler2D feedback, int seed, vec3 b1, vec2 f1, vec3 b2, vec2 f2, vec3 b3, vec2 f3, vec3 m0)
|
||||
{
|
||||
// start
|
||||
|
||||
@@ -237,9 +233,9 @@ subroutine(fx_stage_sub) vec4 fx_8(vec2 vUV, sampler2D previous, sampler2D feedb
|
||||
vec3 c0 = texture(previous, uv0).xyz;
|
||||
|
||||
vec2 uv2 = uv1;
|
||||
uv2 = mix(uv2, kal2(uv2 * rot(0.25), floor(axes * 9 + 1)) * vec2(1, -2) + vec2(0, -0.5), axes_trigger);
|
||||
uv2 = mix(uv2, kal2(uv2 * rot(.25), floor(axes * 9 + 1)) * vec2(1, -2) + vec2(0, -.5), axes_trigger);
|
||||
uv2 *= rot(rotation);
|
||||
uv2.x = (saw(uv2.x / ratio + 0.5 + h_scroll * 2) - 0.5) * ratio;
|
||||
uv2.x = (saw(uv2.x / ratio + .5 + h_scroll * 2) - .5) * ratio;
|
||||
vec3 c = reframe(previous, uv2).xyz;
|
||||
|
||||
return fx_master(c0, c, seed, m0);
|
||||
@@ -248,7 +244,7 @@ subroutine(fx_stage_sub) vec4 fx_8(vec2 vUV, sampler2D previous, sampler2D feedb
|
||||
#include inc_cp437.glsl
|
||||
|
||||
// FX 9 : cp437
|
||||
subroutine(fx_stage_sub) vec4 fx_9(vec2 vUV, sampler2D previous, sampler2D feedback, int seed, vec3 b1, vec2 f1, vec3 b2, vec2 f2, vec3 b3, vec2 f3, vec3 m0)
|
||||
vec4 fx_9(vec2 vUV, sampler2D previous, sampler2D feedback, int seed, vec3 b1, vec2 f1, vec3 b2, vec2 f2, vec3 b3, vec2 f3, vec3 m0)
|
||||
{
|
||||
// start
|
||||
|
||||
@@ -274,21 +270,21 @@ subroutine(fx_stage_sub) vec4 fx_9(vec2 vUV, sampler2D previous, sampler2D feedb
|
||||
uv2 = floor(uv2 * k1) * inv_k;
|
||||
int start_char = charset_ctrl.x > 0 ? charsets[int(charset.x * CHARSETS) * 2] : 0x01;
|
||||
int char_span = int((charset_ctrl.x > 0 ? charsets[int(charset.x * CHARSETS) * 2 + 1] : 255));
|
||||
char_span = int(char_span * max(1 - charset.y, 1 / (char_span * 0.75)));
|
||||
char_span = int(char_span * max(1 - charset.y, 1 / (char_span * .75)));
|
||||
ivec2 uv2i = ivec2(uv2 * k1);
|
||||
int code = ((charset_ctrl.y < 1 || (uv2i.x % 2 ^ uv2i.y % 2) > 0) ? 1 : 0) * (start_char + int((rand(uv2i) + char_delta) * char_span) % char_span);
|
||||
vec3 c = reframe(previous, uv2 + vec2(0, 0) * inv_k * 0.125).xyz * 0.2
|
||||
+ reframe(previous, uv2 + vec2(1, 0) * inv_k * 0.125).xyz * 0.2
|
||||
+ reframe(previous, uv2 + vec2(1, 1) * inv_k * 0.125).xyz * 0.2
|
||||
+ reframe(previous, uv2 + vec2(0, 1) * inv_k * 0.125).xyz * 0.2
|
||||
+ reframe(previous, uv2 + vec2(0.5, 0.5) * inv_k * 0.125).xyz * 0.2;
|
||||
vec3 c = reframe(previous, uv2 + vec2(0, 0) * inv_k * .125).xyz * .2
|
||||
+ reframe(previous, uv2 + vec2(1, 0) * inv_k * .125).xyz * .2
|
||||
+ reframe(previous, uv2 + vec2(1, 1) * inv_k * .125).xyz * .2
|
||||
+ reframe(previous, uv2 + vec2(0, 1) * inv_k * .125).xyz * .2
|
||||
+ reframe(previous, uv2 + vec2(.5, .5) * inv_k * .125).xyz * .2;
|
||||
c = char(mod(uv1 * k1, 1), code) ? c : vec3(0);
|
||||
|
||||
return fx_master(c0, c, seed, m0);
|
||||
}
|
||||
|
||||
// FX 10 : lens
|
||||
subroutine(fx_stage_sub) vec4 fx_10(vec2 vUV, sampler2D previous, sampler2D feedback, int seed, vec3 b1, vec2 f1, vec3 b2, vec2 f2, vec3 b3, vec2 f3, vec3 m0)
|
||||
vec4 fx_10(vec2 vUV, sampler2D previous, sampler2D feedback, int seed, vec3 b1, vec2 f1, vec3 b2, vec2 f2, vec3 b3, vec2 f3, vec3 m0)
|
||||
{
|
||||
// start
|
||||
|
||||
@@ -316,7 +312,7 @@ subroutine(fx_stage_sub) vec4 fx_10(vec2 vUV, sampler2D previous, sampler2D feed
|
||||
}
|
||||
|
||||
// FX 11 : spill
|
||||
subroutine(fx_stage_sub) vec4 fx_11(vec2 vUV, sampler2D previous, sampler2D feedback, int seed, vec3 b1, vec2 f1, vec3 b2, vec2 f2, vec3 b3, vec2 f3, vec3 m0)
|
||||
vec4 fx_11(vec2 vUV, sampler2D previous, sampler2D feedback, int seed, vec3 b1, vec2 f1, vec3 b2, vec2 f2, vec3 b3, vec2 f3, vec3 m0)
|
||||
{
|
||||
// start
|
||||
|
||||
@@ -345,14 +341,14 @@ subroutine(fx_stage_sub) vec4 fx_11(vec2 vUV, sampler2D previous, sampler2D feed
|
||||
}
|
||||
|
||||
// FX 12 : Game Of Life
|
||||
subroutine(fx_stage_sub) vec4 fx_12(vec2 vUV, sampler2D previous, sampler2D feedback, int seed, vec3 b1, vec2 f1, vec3 b2, vec2 f2, vec3 b3, vec2 f3, vec3 m0)
|
||||
vec4 fx_12(vec2 vUV, sampler2D previous, sampler2D feedback, int seed, vec3 b1, vec2 f1, vec3 b2, vec2 f2, vec3 b3, vec2 f3, vec3 m0)
|
||||
{
|
||||
return texture(previous, vUV); // TODO disabled
|
||||
// start
|
||||
|
||||
vec2 uv0 = vUV.st;
|
||||
float ratio = iResolution.x / iResolution.y;
|
||||
vec2 uv1 = (uv0 - 0.5) * vec2(ratio, 1);
|
||||
vec2 uv1 = (uv0 - .5) * vec2(ratio, 1);
|
||||
|
||||
// controls
|
||||
|
||||
@@ -360,7 +356,7 @@ subroutine(fx_stage_sub) vec4 fx_12(vec2 vUV, sampler2D previous, sampler2D feed
|
||||
bool pixel_size_trigger = magic_trigger(b1, seed + 10);
|
||||
f2 = magic_f(f2, b2, seed + 20);
|
||||
int rule = int(f2.x * 12);
|
||||
float threshold = f2.y * 0.9 + 0.05;
|
||||
float threshold = f2.y * .9 + .05;
|
||||
float fb = magic(f3, b3, seed + 30);
|
||||
|
||||
// logic
|
||||
@@ -372,13 +368,13 @@ subroutine(fx_stage_sub) vec4 fx_12(vec2 vUV, sampler2D previous, sampler2D feed
|
||||
float p = 1 / k1;
|
||||
uv2 = round(uv2 * k1) / k1;
|
||||
vec3 c1 = mix(
|
||||
reframe(previous, uv2 + vec2(0.5, 0.5) * p).xyz,
|
||||
reframe(feedback, uv2 + vec2(0.5, 0.5) * p).xyz,
|
||||
reframe(previous, uv2 + vec2(.5, .5) * p).xyz,
|
||||
reframe(feedback, uv2 + vec2(.5, .5) * p).xyz,
|
||||
fb
|
||||
);
|
||||
vec3 c2 = mix(
|
||||
reframe(previous, uv2 + vec2(1.5, 0.5) * p).xyz,
|
||||
reframe(feedback, uv2 + vec2(1.5, 0.5) * p).xyz,
|
||||
reframe(previous, uv2 + vec2(1.5, .5) * p).xyz,
|
||||
reframe(feedback, uv2 + vec2(1.5, .5) * p).xyz,
|
||||
fb
|
||||
);
|
||||
vec3 c3 = mix(
|
||||
@@ -387,33 +383,33 @@ subroutine(fx_stage_sub) vec4 fx_12(vec2 vUV, sampler2D previous, sampler2D feed
|
||||
fb
|
||||
);
|
||||
vec3 c4 = mix(
|
||||
reframe(previous, uv2 + vec2(0.5, 1.5) * p).xyz,
|
||||
reframe(feedback, uv2 + vec2(0.5, 1.5) * p).xyz,
|
||||
reframe(previous, uv2 + vec2(.5, 1.5) * p).xyz,
|
||||
reframe(feedback, uv2 + vec2(.5, 1.5) * p).xyz,
|
||||
fb
|
||||
);
|
||||
vec3 c5 = mix(
|
||||
reframe(previous, uv2 + vec2(-0.5, 1.5) * p).xyz,
|
||||
reframe(feedback, uv2 + vec2(-0.5, 1.5) * p).xyz,
|
||||
reframe(previous, uv2 + vec2(-.5, 1.5) * p).xyz,
|
||||
reframe(feedback, uv2 + vec2(-.5, 1.5) * p).xyz,
|
||||
fb
|
||||
);
|
||||
vec3 c6 = mix(
|
||||
reframe(previous, uv2 + vec2(-0.5, 0.5) * p).xyz,
|
||||
reframe(feedback, uv2 + vec2(-0.5, 0.5) * p).xyz,
|
||||
reframe(previous, uv2 + vec2(-.5, .5) * p).xyz,
|
||||
reframe(feedback, uv2 + vec2(-.5, .5) * p).xyz,
|
||||
fb
|
||||
);
|
||||
vec3 c7 = mix(
|
||||
reframe(previous, uv2 + vec2(-0.5, -0.5) * p).xyz,
|
||||
reframe(feedback, uv2 + vec2(-0.5, -0.5) * p).xyz,
|
||||
reframe(previous, uv2 + vec2(-.5, -.5) * p).xyz,
|
||||
reframe(feedback, uv2 + vec2(-.5, -.5) * p).xyz,
|
||||
fb
|
||||
);
|
||||
vec3 c8 = mix(
|
||||
reframe(previous, uv2 + vec2(0.5, -0.5) * p).xyz,
|
||||
reframe(feedback, uv2 + vec2(0.5, -0.5) * p).xyz,
|
||||
reframe(previous, uv2 + vec2(.5, -.5) * p).xyz,
|
||||
reframe(feedback, uv2 + vec2(.5, -.5) * p).xyz,
|
||||
fb
|
||||
);
|
||||
vec3 c9 = mix(
|
||||
reframe(previous, uv2 + vec2(-0.5, -0.5) * p).xyz,
|
||||
reframe(feedback, uv2 + vec2(-0.5, -0.5) * p).xyz,
|
||||
reframe(previous, uv2 + vec2(-.5, -.5) * p).xyz,
|
||||
reframe(feedback, uv2 + vec2(-.5, -.5) * p).xyz,
|
||||
fb
|
||||
);
|
||||
bool alive = mean(c1) >= threshold;
|
||||
@@ -460,7 +456,7 @@ subroutine(fx_stage_sub) vec4 fx_12(vec2 vUV, sampler2D previous, sampler2D feed
|
||||
}
|
||||
|
||||
// FX 13 : Sobel
|
||||
subroutine(fx_stage_sub) vec4 fx_13(vec2 vUV, sampler2D previous, sampler2D feedback, int seed, vec3 b1, vec2 f1, vec3 b2, vec2 f2, vec3 b3, vec2 f3, vec3 m0)
|
||||
vec4 fx_13(vec2 vUV, sampler2D previous, sampler2D feedback, int seed, vec3 b1, vec2 f1, vec3 b2, vec2 f2, vec3 b3, vec2 f3, vec3 m0)
|
||||
{
|
||||
// start
|
||||
|
||||
@@ -472,14 +468,14 @@ subroutine(fx_stage_sub) vec4 fx_13(vec2 vUV, sampler2D previous, sampler2D feed
|
||||
|
||||
float sx = magic(f1, b1, seed + 10) * 2;
|
||||
float sy = magic(f2, b2, seed + 20) * 2;
|
||||
float disp = 0.005 * magic(f3, b3, seed + 30);
|
||||
float disp = .005 * magic(f3, b3, seed + 30);
|
||||
|
||||
// logic
|
||||
|
||||
vec3 c0 = texture(previous, uv0).xyz;
|
||||
|
||||
const mat3x3 sobelx = {{-1, -2, -1}, {0, 0, 0}, {1, 2, 1}};
|
||||
const mat3x3 sobely = {{-1, 0, 1}, {-2, 0, 2}, {-1, 0, 1}};
|
||||
const mat3x3 sobelx = mat3x3(-1, -2, -1, 0, 0, 0, 1, 2, 1);
|
||||
const mat3x3 sobely = mat3x3(-1, 0, 1, -2, 0, 2, -1, 0, 1);
|
||||
|
||||
mat3x3 sobel = sobelx * sx + sobely * sy;
|
||||
|
||||
@@ -489,7 +485,7 @@ subroutine(fx_stage_sub) vec4 fx_13(vec2 vUV, sampler2D previous, sampler2D feed
|
||||
}
|
||||
|
||||
// FX 14 : Isometric
|
||||
subroutine(fx_stage_sub) vec4 fx_14(vec2 vUV, sampler2D previous, sampler2D feedback, int seed, vec3 b1, vec2 f1, vec3 b2, vec2 f2, vec3 b3, vec2 f3, vec3 m0)
|
||||
vec4 fx_14(vec2 vUV, sampler2D previous, sampler2D feedback, int seed, vec3 b1, vec2 f1, vec3 b2, vec2 f2, vec3 b3, vec2 f3, vec3 m0)
|
||||
{
|
||||
// start
|
||||
|
||||
@@ -524,11 +520,10 @@ subroutine(fx_stage_sub) vec4 fx_14(vec2 vUV, sampler2D previous, sampler2D feed
|
||||
return fx_master(c0, c, seed, m0);
|
||||
}
|
||||
|
||||
// FX 15 : Random
|
||||
subroutine(fx_stage_sub) vec4 fx_15(vec2 vUV, sampler2D previous, sampler2D feedback, int seed, vec3 b1, vec2 f1, vec3 b2, vec2 f2, vec3 b3, vec2 f3, vec3 m0)
|
||||
{
|
||||
return texture(previous, vUV); // TODO disabled
|
||||
int fx = int(randTime(seed + 100) * 14);
|
||||
vec4 fx_stage(int fx, vec2 vUV, sampler2D previous, sampler2D feedback, int seed, vec3 b1, vec2 f1, vec3 b2, vec2 f2, vec3 b3, vec2 f3, vec3 m0) {
|
||||
if (fx >= 15) {
|
||||
fx = int(randTime(seed + 100) * 14);
|
||||
}
|
||||
|
||||
if (fx == 0) {
|
||||
return fx_1(vUV, previous, feedback, seed, b1, f1, b2, f2, b3, f3, m0);
|
||||
|
||||
Reference in New Issue
Block a user