Add support for DXT2 / DXT4 aliases of DXT3 (BC2) and DXT5 (BC3)

* The only difference in these is whether or not pre-multiplied alpha is assumed
  to be used, and that doesn't change the actual data - only the interpretation.
This commit is contained in:
baldurk
2019-10-28 11:23:37 +00:00
parent b6c9b6298f
commit 15c0244fd4
+2
View File
@@ -937,9 +937,11 @@ dds_data load_dds_from_file(FILE *f)
case MAKE_FOURCC('D', 'X', 'T', '1'):
ret.format = DXGIFormat2ResourceFormat(DXGI_FORMAT_BC1_UNORM);
break;
case MAKE_FOURCC('D', 'X', 'T', '2'):
case MAKE_FOURCC('D', 'X', 'T', '3'):
ret.format = DXGIFormat2ResourceFormat(DXGI_FORMAT_BC2_UNORM);
break;
case MAKE_FOURCC('D', 'X', 'T', '4'):
case MAKE_FOURCC('D', 'X', 'T', '5'):
ret.format = DXGIFormat2ResourceFormat(DXGI_FORMAT_BC3_UNORM);
break;