Merge branch 'master' into multicam

This commit is contained in:
itsmattkc
2022-09-25 16:39:03 -07:00
100 changed files with 2450 additions and 977 deletions
+6
View File
@@ -9,6 +9,7 @@ uniform sampler2D garbage_in;
uniform sampler2D core_in;
uniform bool garbage_in_enabled;
uniform bool core_in_enabled;
uniform bool invert_in;
uniform float highlights_in;
uniform float shadows_in;
@@ -94,6 +95,11 @@ void main() {
mask = shadows_in * 0.01 * (highlights_in * 0.01 * mask - 1.0) + 1.0;
mask = clamp(mask, 0.0, 1.0);
// Invert
if (invert_in) {
mask = 1.0 - mask;
}
col.rgb *= mask;
col.w = mask;
+12
View File
@@ -0,0 +1,12 @@
// Input texture
uniform sampler2D tex_in;
// Input texture coordinate
in vec2 ove_texcoord;
out vec4 frag_color;
void main() {
vec4 color = texture(tex_in, ove_texcoord);
color.rgb = 1.0 - color.rgb;
frag_color = color;
}
+38
View File
@@ -0,0 +1,38 @@
uniform float evolution_in;
uniform float intensity_in;
uniform float frequency_in;
uniform vec2 position_in;
uniform bool stretch_in;
uniform vec2 resolution_in;
uniform sampler2D tex_in;
in vec2 ove_texcoord;
out vec4 frag_color;
void main(void) {
vec2 center = position_in/resolution_in;
vec2 adj_texcoord = ove_texcoord;
adj_texcoord -= 0.5;
if (!stretch_in) {
// Adjust by aspect ratio
float ar = (resolution_in.x/resolution_in.y);
if (resolution_in.x > resolution_in.y) {
adj_texcoord.y /= ar;
center.y /= ar;
} else {
adj_texcoord.x *= ar;
center.x *= ar;
}
}
adj_texcoord += 0.5;
center += 0.5;
adj_texcoord -= center;
float len = length(adj_texcoord);
vec2 uv = ove_texcoord + (adj_texcoord/len)*cos((frequency_in)*(len*12.0-evolution_in))*(intensity_in*0.0005);
frag_color = texture(tex_in, uv);
}
+29
View File
@@ -0,0 +1,29 @@
// Swirl effect parameters
uniform float radius_in;
uniform float angle_in;
uniform vec2 pos_in;
uniform vec2 resolution_in;
uniform sampler2D tex_in;
in vec2 ove_texcoord;
out vec4 frag_color;
void main(void) {
vec2 center = resolution_in*0.5 + pos_in;
vec2 uv = ove_texcoord;
vec2 tc = uv * resolution_in;
tc -= center;
float dist = length(tc);
if (dist < radius_in) {
float percent = (radius_in - dist) / radius_in;
float theta = percent * percent * -angle_in;
float s = sin(theta);
float c = cos(theta);
tc = vec2(dot(tc, vec2(c, -s)), dot(tc, vec2(s, c)));
}
tc += center;
frag_color = texture(tex_in, tc / resolution_in);
}
+61
View File
@@ -0,0 +1,61 @@
uniform float scale_in;
uniform vec2 position_in;
uniform vec2 resolution_in;
uniform bool mirrorx_in;
uniform bool mirrory_in;
uniform int anchor_in;
uniform sampler2D tex_in;
in vec2 ove_texcoord;
out vec4 frag_color;
#define TOP_LEFT 0
#define TOP_CENTER 1
#define TOP_RIGHT 2
#define MIDDLE_LEFT 3
#define MIDDLE_CENTER 4
#define MIDDLE_RIGHT 5
#define BOTTOM_LEFT 6
#define BOTTOM_CENTER 7
#define BOTTOM_RIGHT 8
void main(void) {
vec2 coord = ove_texcoord;
vec2 offset;
if (anchor_in == TOP_LEFT || anchor_in == TOP_CENTER || anchor_in == TOP_RIGHT) {
offset.y = 0.0;
} else if (anchor_in == MIDDLE_LEFT || anchor_in == MIDDLE_CENTER || anchor_in == MIDDLE_RIGHT) {
offset.y = 0.5;
} else if (anchor_in == BOTTOM_LEFT || anchor_in == BOTTOM_CENTER || anchor_in == BOTTOM_RIGHT) {
offset.y = 1.0;
}
if (anchor_in == TOP_LEFT || anchor_in == MIDDLE_LEFT || anchor_in == BOTTOM_LEFT) {
offset.x = 0.0;
} else if (anchor_in == TOP_CENTER || anchor_in == MIDDLE_CENTER || anchor_in == BOTTOM_CENTER) {
offset.x = 0.5;
} else if (anchor_in == TOP_RIGHT || anchor_in == MIDDLE_RIGHT || anchor_in == BOTTOM_RIGHT) {
offset.x = 1.0;
}
coord -= position_in/resolution_in;
coord -= offset;
coord /= scale_in;
coord += offset;
vec2 modcoord = mod(coord, 1.0);
if (mirrorx_in && mod(coord.x, 2.0) > 1.0) {
modcoord.x = 1.0 - modcoord.x;
}
if (mirrory_in && mod(coord.y, 2.0) > 1.0) {
modcoord.y = 1.0 - modcoord.y;
}
frag_color = vec4(texture(tex_in, modcoord));
}
+25
View File
@@ -0,0 +1,25 @@
uniform float frequency_in;
uniform float intensity_in;
uniform float evolution_in;
uniform bool vertical_in;
uniform sampler2D tex_in;
in vec2 ove_texcoord;
out vec4 frag_color;
void main(void) {
vec2 pos = ove_texcoord;
if (vertical_in) {
pos.x -= sin((ove_texcoord.y-(evolution_in*0.01))*frequency_in)*intensity_in*0.01;
} else {
pos.y -= sin((ove_texcoord.x-(evolution_in*0.01))*frequency_in)*intensity_in*0.01;
}
if (pos.x < 0.0 || pos.x >= 1.0 || pos.y < 0.0 || pos.y >= 1.0) {
discard;
} else {
frag_color = texture(tex_in, pos);
}
}