Skip to content

Commit

Permalink
--ignore-mips does not apply to array textures (#567)
Browse files Browse the repository at this point in the history
  • Loading branch information
walbourn authored Dec 16, 2024
1 parent 5864794 commit aec0784
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion DirectXTex/DirectXTexDDS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ namespace
}

metadata.mipLevels = pHeader->mipMapCount;
if ((metadata.mipLevels == 0) || (flags & DDS_FLAGS_IGNORE_MIPS))
if (metadata.mipLevels == 0)
{
metadata.mipLevels = 1;
}
Expand Down Expand Up @@ -650,6 +650,12 @@ namespace
}
}

// Special-handling flag for ignoring mipchains on simple DDS files
if ((flags & DDS_FLAGS_IGNORE_MIPS) && (metadata.arraySize == 1))
{
metadata.mipLevels = 1;
}

// Handle DDS-specific metadata
if (ddPixelFormat)
{
Expand Down

0 comments on commit aec0784

Please sign in to comment.