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
This commit is contained in:
Thaddeus Crews 2024-11-18 09:23:31 -06:00
commit 3d6e712177
No known key found for this signature in database
GPG Key ID: 62181B86FE9E5D84

View File

@ -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));
}
}
}