浏览代码

Use source image format when creating padded texture

JoJoX 3 年之前
父节点
当前提交
a6c77c7c5a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scene/resources/tile_set.cpp

+ 1 - 1
scene/resources/tile_set.cpp

@@ -4434,7 +4434,7 @@ void TileSetAtlasSource::_update_padded_texture() {
 
 	Ref<Image> image;
 	image.instantiate();
-	image->create(size.x, size.y, false, Image::FORMAT_RGBA8);
+	image->create(size.x, size.y, false, src->get_format());
 
 	for (KeyValue<Vector2i, TileAlternativesData> kv : tiles) {
 		for (int frame = 0; frame < (int)kv.value.animation_frames_durations.size(); frame++) {