Skip to content

Commit

Permalink
Add ATI1/ATI2 format support for DDS parser
Browse files Browse the repository at this point in the history
These are legacy DDS encodings of BC4/BC5; original Bistro scene comes
with these for normal maps.
  • Loading branch information
zeux committed Dec 9, 2024
1 parent b9245a2 commit 09d3b60
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/textures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ static VkFormat getFormat(const DDS_HEADER& header, const DDS_HEADER_DXT10& head
return VK_FORMAT_BC2_UNORM_BLOCK;
if (header.ddspf.dwFourCC == fourCC("DXT5"))
return VK_FORMAT_BC3_UNORM_BLOCK;
if (header.ddspf.dwFourCC == fourCC("ATI1"))
return VK_FORMAT_BC4_UNORM_BLOCK;
if (header.ddspf.dwFourCC == fourCC("ATI2"))
return VK_FORMAT_BC5_UNORM_BLOCK;

if (header.ddspf.dwFourCC == fourCC("DX10"))
{
Expand Down

0 comments on commit 09d3b60

Please sign in to comment.