fix: reserved keyword char
This commit is contained in:
@@ -295,7 +295,7 @@ const int hex_chars[] = int[16](
|
|||||||
0x46
|
0x46
|
||||||
);
|
);
|
||||||
|
|
||||||
bool char(vec2 pos, int code)
|
bool chr(vec2 pos, int code)
|
||||||
{
|
{
|
||||||
if (pos.x < .0 || pos.y < .0 || pos.x >= 1. || pos.y >= 1.) {
|
if (pos.x < .0 || pos.y < .0 || pos.x >= 1. || pos.y >= 1.) {
|
||||||
return false;
|
return false;
|
||||||
@@ -309,7 +309,7 @@ bool char(vec2 pos, int code)
|
|||||||
|
|
||||||
float char_at(vec2 uv, vec2 pos, int code)
|
float char_at(vec2 uv, vec2 pos, int code)
|
||||||
{
|
{
|
||||||
return char(uv - pos, code) ? 1. : 0.;
|
return chr(uv - pos, code) ? 1. : 0.;
|
||||||
}
|
}
|
||||||
|
|
||||||
float write_5(vec2 uv, vec2 pos, int str[5])
|
float write_5(vec2 uv, vec2 pos, int str[5])
|
||||||
|
|||||||
+1
-1
@@ -281,7 +281,7 @@ subroutine(fx_stage_sub) vec4 fx_9(vec2 vUV, sampler2D previous, sampler2D feedb
|
|||||||
+ reframe(previous, uv2 + vec2(1., 1.) * 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(0., 1.) * inv_k * .125).xyz * .2
|
||||||
+ reframe(previous, uv2 + vec2(.5, .5) * 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.);
|
c = chr(mod(uv1 * k1, 1.), code) ? c : vec3(0.);
|
||||||
|
|
||||||
return fx_master(c0, c, seed, m0);
|
return fx_master(c0, c, seed, m0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ subroutine(src_stage_sub) vec4 src_7(vec2 vUV, int seed, vec3 b1, vec2 f1, vec3
|
|||||||
ivec2 uv2i = ivec2(uv2);
|
ivec2 uv2i = ivec2(uv2);
|
||||||
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);
|
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);
|
||||||
uv2 = mod(uv2, 1.);
|
uv2 = mod(uv2, 1.);
|
||||||
float f = char(uv2, code) ? 1. : 0.;
|
float f = chr(uv2, code) ? 1. : 0.;
|
||||||
|
|
||||||
return vec4(f);
|
return vec4(f);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user