mirror of
https://github.com/godotengine/godot.git
synced 2024-11-23 04:33:29 +00:00
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:
commit
3d6e712177
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user