Add opacity support to EdgesWork

This commit is contained in:
Edwin Jakobs
2020-05-01 22:48:20 +02:00
parent 255cec6af3
commit de6095224a
2 changed files with 4 additions and 2 deletions

View File

@@ -12,6 +12,7 @@ float random(vec3 scale, float seed) {
// Implementation by Evan Wallace (glfx.js)
void main() {
vec4 center = texture(tex0, v_texCoord0);
vec2 color = vec2(0.0);
vec2 total = vec2(0.0);
@@ -33,5 +34,5 @@ void main() {
}
}
o_color = vec4(color / total, 0.0, 1.0);
o_color = vec4(color / total, 0.0, 1.0) * center.a;
}

View File

@@ -13,6 +13,7 @@ float random(vec3 scale, float seed) {
// Implementation by Evan Wallace (glfx.js)
void main() {
vec4 center = texture(tex0, v_texCoord0);
vec2 color = vec2(0.0);
vec2 total = vec2(0.0);
@@ -34,5 +35,5 @@ void main() {
}
float c = clamp(10000.0 * (color.y / total.y - color.x / total.x) + 0.5, 0.0, 1.0);
o_color = vec4(c, c, c, 1.0);
o_color = vec4(c, c, c, 1.0) * center.a;
}