2015-02-06 01:44:16 +01:00
|
|
|
#version 120
|
|
|
|
|
|
|
|
varying vec4 v_color;
|
|
|
|
varying vec2 v_texCoord;
|
|
|
|
|
2018-06-24 09:02:40 +02:00
|
|
|
varying float v_blockID;
|
|
|
|
|
2015-02-06 01:44:16 +01:00
|
|
|
uniform sampler2D u_tex;
|
|
|
|
|
|
|
|
vec4 getColor() {
|
|
|
|
vec4 color = v_color;
|
2018-06-13 21:48:35 +02:00
|
|
|
|
2018-06-29 22:23:45 +02:00
|
|
|
// if(color == vec4(0, 0, 0, 1)) {
|
|
|
|
if (v_texCoord.x != -1 && v_texCoord.y != -1) {
|
|
|
|
vec4 texColor = texture2D(u_tex, v_texCoord);
|
|
|
|
color = vec4(texColor.rgb - (1 - color.rgb), min(texColor.a, color.a));
|
2015-02-06 01:44:16 +01:00
|
|
|
}
|
2018-06-13 21:48:35 +02:00
|
|
|
|
2015-02-06 01:44:16 +01:00
|
|
|
return color;
|
|
|
|
}
|