mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-11 06:11:50 +09:00
this is a super jank solution but it worked (shrug)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
17
src/shaders/demultiply.frag
Normal file
17
src/shaders/demultiply.frag
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user