浏览代码

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
Thaddeus Crews 9 月之前
父节点
当前提交
3d6e712177
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      editor/import/resource_importer_texture.cpp

+ 1 - 1
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));
 				}
 			}
 		}