this is a super jank solution but it worked (shrug)

This commit is contained in:
minjaesong
2022-04-20 20:15:26 +09:00
parent b3a27bb428
commit fd72b3d3ba
3 changed files with 22 additions and 0 deletions

View File

@@ -30,4 +30,5 @@ void main() {
vec4 selvec = vec4(0.0, 0.0, 0.0, (alpha > bayerThreshold) ? 1.0 : 0.0);
gl_FragColor = inColor * boolean.yyyx + selvec;
gl_FragColor = inColor;
}

View File

@@ -0,0 +1,17 @@
#version 130
#ifdef GL_ES
precision mediump float;
#endif
varying vec4 v_color;
varying vec2 v_texCoords;
uniform sampler2D u_texture;
vec2 boolean = vec2(0.0, 1.0);
void main() {
vec4 inColor = v_color * (texture2D(u_texture, v_texCoords));
vec4 divided = inColor / pow(inColor.aaaa, vec4(2.0));
gl_FragColor = divided * boolean.yyyx + inColor * boolean.xxxy;
}