mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-12 14:31:50 +00:00
mip-mapping related fixes
This commit is contained in:
parent
7ddf3f7537
commit
d9277e1b31
4 changed files with 34 additions and 15 deletions
|
|
@ -16,8 +16,11 @@ void main() {
|
|||
vec4 tex_color = texture(u_texture0, a_texCoord);
|
||||
float depth = (a_distance/256.0);
|
||||
float alpha = a_color.a * tex_color.a;
|
||||
if (u_alphaClip && alpha < 0.9f)
|
||||
discard;
|
||||
if (u_alphaClip) {
|
||||
if (alpha < 0.2f)
|
||||
discard;
|
||||
alpha = 1.0;
|
||||
}
|
||||
f_color = mix(a_color * tex_color, vec4(fogColor,1.0),
|
||||
min(1.0, pow(depth*u_fogFactor, u_fogCurve)));
|
||||
f_color.a = alpha;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue