mirror of
https://github.com/griffi-gh/kubi.git
synced 2024-11-10 01:28:41 -06:00
discard alpha, use treshold
This commit is contained in:
parent
d909ff7424
commit
2d655ea8f1
|
@ -19,9 +19,11 @@ uniform sampler2DArray tex;
|
||||||
void main() {
|
void main() {
|
||||||
// base color from texture
|
// base color from texture
|
||||||
color = texture(tex, vec3(v_uv, v_tex_index));
|
color = texture(tex, vec3(v_uv, v_tex_index));
|
||||||
// discard fully transparent pixels
|
// discard transparent pixels
|
||||||
if (color.w <= 0.0) discard;
|
if (color.w < 0.5) discard;
|
||||||
//basic "lighting"
|
//basic "lighting"
|
||||||
float light = abs(v_normal.x) + .8 * abs(v_normal.y) + .6 * abs(v_normal.z);
|
float light = abs(v_normal.x) + .8 * abs(v_normal.y) + .6 * abs(v_normal.z);
|
||||||
color *= vec4(vec3(light), 1.);
|
color *= vec4(vec3(light), 1.);
|
||||||
|
//discard alpha
|
||||||
|
color.w = 0.;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue