Progress on implementing unit teams

This commit is contained in:
Anuken
2018-03-15 00:19:05 -04:00
parent 0b2a933faa
commit 155f3945a6
12 changed files with 74 additions and 33 deletions

View File

@@ -7,13 +7,12 @@ uniform sampler2D u_texture;
uniform vec4 u_color;
uniform vec2 u_texsize;
uniform float u_lighten;
varying vec4 v_color;
varying vec2 v_texCoord;
bool id(vec4 v){
return v.a > 0.1 && !(v.r < 0.01 && v.g < 0.01 && v.b < 0.01);
return v.a > 0.1;
}
void main() {
@@ -39,6 +38,6 @@ void main() {
if((c.r < 0.01 && c.g < 0.01 && c.b < 0.01)){
c = vec4(0.0);
}
gl_FragColor = mix(c, vec4(1.0, 1.0, 1.0, c.a), u_lighten) * v_color;
gl_FragColor = mix(c, vec4(1.0, 1.0, 1.0, c.a), c.a) * v_color;
}
}