mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-09-09 07:27:05 +00:00
fix: t6 modman textures (#849)
* feat: dynamically decompress bc5 textures for modman * chore: restructure image format class * chore: keep dds file conversions * chore: convert all kinds of webgl unsupported formats * chore: add decompressors for remaining formats * chore: always set full alpha if available on bc4 and bc5 decompression
This commit is contained in:
@@ -100,16 +100,20 @@ namespace image
|
||||
void CLASS_NAME::DumpAsset(AssetDumpingContext& context, const XAssetInfo<AssetImage::Type>& asset)
|
||||
{
|
||||
const auto* image = asset.Asset();
|
||||
const auto texture = CONVERTER_NAME().Convert(asset, context.m_obj_search_path);
|
||||
auto texture = CONVERTER_NAME().Convert(asset, context.m_obj_search_path);
|
||||
if (!texture)
|
||||
return;
|
||||
|
||||
auto convertedTexture = ConvertTextureForDdsFileOutputIfNecessary(texture.get());
|
||||
if (convertedTexture)
|
||||
texture = std::move(convertedTexture);
|
||||
|
||||
if (!m_writer->SupportsImageFormat(texture->GetFormat()))
|
||||
{
|
||||
con::warn("Not dumping image {} as {} does not support the image format {}",
|
||||
image->name,
|
||||
GetImageOutputFormatName(ObjWriting::Configuration.ImageOutputFormat),
|
||||
GetImageFormatName(texture->GetFormat()->GetId()));
|
||||
texture->GetFormat()->GetName());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user