mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
BasisU: Use KTX2 format and add import options to configure encoder
This commit is contained in:
@@ -104,7 +104,7 @@ void (*Image::_image_decompress_astc)(Image *) = nullptr;
|
||||
Vector<uint8_t> (*Image::webp_lossy_packer)(const Ref<Image> &, float) = nullptr;
|
||||
Vector<uint8_t> (*Image::webp_lossless_packer)(const Ref<Image> &) = nullptr;
|
||||
Vector<uint8_t> (*Image::png_packer)(const Ref<Image> &) = nullptr;
|
||||
Vector<uint8_t> (*Image::basis_universal_packer)(const Ref<Image> &, Image::UsedChannels) = nullptr;
|
||||
Vector<uint8_t> (*Image::basis_universal_packer)(const Ref<Image> &, Image::UsedChannels, const BasisUniversalPackerParams &) = nullptr;
|
||||
|
||||
Ref<Image> (*Image::webp_unpacker)(const Vector<uint8_t> &) = nullptr;
|
||||
Ref<Image> (*Image::png_unpacker)(const Vector<uint8_t> &) = nullptr;
|
||||
|
||||
@@ -182,6 +182,11 @@ public:
|
||||
ALPHA_BLEND
|
||||
};
|
||||
|
||||
struct BasisUniversalPackerParams {
|
||||
int uastc_level = 0;
|
||||
float rdo_quality_loss = 0;
|
||||
};
|
||||
|
||||
// External saver function pointers.
|
||||
|
||||
static inline SavePNGFunc save_png_func = nullptr;
|
||||
@@ -231,7 +236,7 @@ public:
|
||||
static Vector<uint8_t> (*webp_lossy_packer)(const Ref<Image> &p_image, float p_quality);
|
||||
static Vector<uint8_t> (*webp_lossless_packer)(const Ref<Image> &p_image);
|
||||
static Vector<uint8_t> (*png_packer)(const Ref<Image> &p_image);
|
||||
static Vector<uint8_t> (*basis_universal_packer)(const Ref<Image> &p_image, UsedChannels p_channels);
|
||||
static Vector<uint8_t> (*basis_universal_packer)(const Ref<Image> &p_image, UsedChannels p_channels, const BasisUniversalPackerParams &p_basisu_params);
|
||||
|
||||
static Ref<Image> (*webp_unpacker)(const Vector<uint8_t> &p_buffer);
|
||||
static Ref<Image> (*png_unpacker)(const Vector<uint8_t> &p_buffer);
|
||||
|
||||
Reference in New Issue
Block a user