Texture filtering for image node

This commit is contained in:
luboslenco
2019-11-15 00:17:53 +01:00
parent bd84ec994e
commit ed11db8e36
2 changed files with 13 additions and 2 deletions
+12 -2
View File
@@ -1746,8 +1746,18 @@ class Material {
name: tex_name,
file: filepath
};
tex.min_filter = 'anisotropic';
tex.mipmap_filter = 'linear';
if (arm.ui.UITrait.inst.textureFilter) {
tex.min_filter = 'anisotropic';
tex.mag_filter = 'linear';
tex.mipmap_filter = 'linear';
}
else {
tex.min_filter = 'point';
tex.mag_filter = 'point';
tex.mipmap_filter = 'no';
}
tex.generate_mipmaps = true;
tex.u_addressing = 'repeat';
tex.v_addressing = 'repeat';