shader updates

This commit is contained in:
minjaesong
2023-02-28 17:18:22 +09:00
parent 8d7a62f796
commit 315b984d3b
34 changed files with 212 additions and 143 deletions

View File

@@ -1,16 +1,17 @@
#version 130
#version 150
#ifdef GL_ES
precision mediump float;
#endif
varying vec4 v_color;
varying vec2 v_texCoords;
in vec4 v_color;
in vec2 v_texCoords;
uniform sampler2D u_texture;
out vec4 fragColor;
void main(void) {
vec4 inColor = texture2D(u_texture, v_texCoords);
ivec4 bytes = ivec4(255.0 * inColor);
ivec4 mask = ivec4(0x55);
gl_FragColor = (bytes ^ mask) / 255.0;
fragColor = (bytes ^ mask) / 255.0;
}