From e179bf0726868fbf2c6216a6c6a715c4a2f99419 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Tue, 3 Jul 2018 10:55:50 -0300 Subject: Ensure, if a texture meant for a normal map is imported and size limit exists, that it's renormalized after resize. --- editor/import/resource_importer_texture.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'editor') diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp index beaa8d9600..17a9394b51 100644 --- a/editor/import/resource_importer_texture.cpp +++ b/editor/import/resource_importer_texture.cpp @@ -395,6 +395,10 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String image->resize(new_width, new_height, Image::INTERPOLATE_CUBIC); } + + if (normal) { + image->normalize(); + } } if (fix_alpha_border) { -- cgit v1.2.3