texture import BC conversion fix: do block alignment after format was determined
This commit is contained in:
@@ -853,9 +853,6 @@ namespace wi
|
||||
Texture uncompressed_src = std::move(resource->texture);
|
||||
resource->srgb_subresource = -1;
|
||||
|
||||
desc.width = AlignTo(desc.width, GetFormatBlockSize(desc.format));
|
||||
desc.height = AlignTo(desc.height, GetFormatBlockSize(desc.format));
|
||||
|
||||
desc.format = Format::BC1_UNORM;
|
||||
if (has_flag(flags, Flags::IMPORT_NORMALMAP))
|
||||
{
|
||||
@@ -900,6 +897,9 @@ namespace wi
|
||||
}
|
||||
desc.bind_flags = BindFlag::SHADER_RESOURCE;
|
||||
|
||||
desc.width = AlignTo(desc.width, GetFormatBlockSize(desc.format));
|
||||
desc.height = AlignTo(desc.height, GetFormatBlockSize(desc.format));
|
||||
|
||||
success = device->CreateTexture(&desc, nullptr, &resource->texture);
|
||||
device->SetName(&resource->texture, name.c_str());
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace wi::version
|
||||
// minor features, major updates, breaking compatibility changes
|
||||
const int minor = 71;
|
||||
// minor bug fixes, alterations, refactors, updates
|
||||
const int revision = 217;
|
||||
const int revision = 218;
|
||||
|
||||
const std::string version_string = std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(revision);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user