mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-11 06:11:50 +09:00
shader updates
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user