This commit is contained in:
luboslenco
2019-11-13 22:17:17 +01:00
parent 6dc813d543
commit eefcb26bd4
2 changed files with 10 additions and 20 deletions
+5 -16
View File
@@ -1737,31 +1737,20 @@ class Material {
//
static function make_texture(image_node:TNode, tex_name:String, matname:String = null):TBindTexture {
var filepath = image_node.buttons[0].data;
if (filepath == '' || filepath.indexOf('.') == -1) {
return null;
}
var tex:TBindTexture = {
name: tex_name,
file: ''
file: filepath
};
var filepath = image_node.buttons[0].data;
if (filepath == '') {
return null;
}
tex.file = filepath;
var s = tex.file.split('.');
if (s.length == 1) {
return null;
}
var interpolation = 'Smart';
tex.min_filter = 'anisotropic';
tex.mipmap_filter = 'linear';
tex.generate_mipmaps = true;
tex.u_addressing = 'repeat';
tex.v_addressing = 'repeat';
return tex;
}