summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThaddeus Crews <repiteo@outlook.com>2024-11-18 09:23:31 -0600
committerThaddeus Crews <repiteo@outlook.com>2024-11-18 09:23:31 -0600
commit3d6e712177e71c3eb78d43436ba2f2876755da36 (patch)
tree78075175872ff7a91f499fa4540f2598fa59fa1f
parent1889d2a2647a7a6cdd84a876f7a6e07da9261903 (diff)
parent49b4c20f3a73bbf09b03f43c638273276590836a (diff)
downloadredot-engine-3d6e712177e71c3eb78d43436ba2f2876755da36.tar.gz
Merge pull request #93714 from Calinou/normal-map-invert-y-preserve-alpha-channel
Preserve existing alpha channel when using Normal Map Invert Y import option
-rw-r--r--editor/import/resource_importer_texture.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp
index 8d6f4e0a70..d72c15bc2a 100644
--- a/editor/import/resource_importer_texture.cpp
+++ b/editor/import/resource_importer_texture.cpp
@@ -590,7 +590,7 @@ Error ResourceImporterTexture::import(ResourceUID::ID p_source_id, const String
for (int i = 0; i < width; i++) {
for (int j = 0; j < height; j++) {
const Color color = target_image->get_pixel(i, j);
- target_image->set_pixel(i, j, Color(color.r, 1 - color.g, color.b));
+ target_image->set_pixel(i, j, Color(color.r, 1 - color.g, color.b, color.a));
}
}
}