summaryrefslogtreecommitdiff
path: root/editor/import
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2018-07-03 10:55:50 -0300
committerJuan Linietsky <reduzio@gmail.com>2018-07-03 10:56:31 -0300
commite179bf0726868fbf2c6216a6c6a715c4a2f99419 (patch)
treeca4c02c36e57147ad1a2e298503b48e21d6e1f47 /editor/import
parent74369229de7f43ce4a0e0a102e5b3bf3c6e3a33a (diff)
Ensure, if a texture meant for a normal map is imported and size limit exists, that it's renormalized after resize.
Diffstat (limited to 'editor/import')
-rw-r--r--editor/import/resource_importer_texture.cpp4
1 files changed, 4 insertions, 0 deletions
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) {