Skip to content

Commit

Permalink
Better support of BC1/2/3 for DDS Loader
Browse files Browse the repository at this point in the history
  • Loading branch information
thennequin committed Jun 3, 2019
1 parent 751b452 commit 5be7344
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/Graphics/TextureLoaders/TextureLoaderDDS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,24 @@ namespace Graphics
{
oDesc.ePixelFormat = PixelFormatEnum::R9G9B9E5_SHAREDEXP;
}
else if (oDDSHeaderDX10.oDxgiFormat == DXGI_FORMAT_BC1_TYPELESS
|| oDDSHeaderDX10.oDxgiFormat == DXGI_FORMAT_BC1_UNORM
|| oDDSHeaderDX10.oDxgiFormat == DXGI_FORMAT_BC1_UNORM_SRGB)
{
oDesc.ePixelFormat = PixelFormatEnum::BC1;
}
else if (oDDSHeaderDX10.oDxgiFormat == DXGI_FORMAT_BC2_TYPELESS
|| oDDSHeaderDX10.oDxgiFormat == DXGI_FORMAT_BC2_UNORM
|| oDDSHeaderDX10.oDxgiFormat == DXGI_FORMAT_BC2_UNORM_SRGB)
{
oDesc.ePixelFormat = PixelFormatEnum::BC2;
}
else if (oDDSHeaderDX10.oDxgiFormat == DXGI_FORMAT_BC3_TYPELESS
|| oDDSHeaderDX10.oDxgiFormat == DXGI_FORMAT_BC3_UNORM
|| oDDSHeaderDX10.oDxgiFormat == DXGI_FORMAT_BC3_UNORM_SRGB)
{
oDesc.ePixelFormat = PixelFormatEnum::BC3;
}
else if (oDDSHeaderDX10.oDxgiFormat == DXGI_FORMAT_BC4_TYPELESS
|| oDDSHeaderDX10.oDxgiFormat == DXGI_FORMAT_BC4_UNORM
|| oDDSHeaderDX10.oDxgiFormat == DXGI_FORMAT_BC4_SNORM)
Expand Down

0 comments on commit 5be7344

Please sign in to comment.