NVTT 1.x wrote A8L8 as RGB instead of LUMINANCE (#229)

This commit is contained in:
Chuck Walbourn
2021-03-30 15:16:12 -07:00
committed by GitHub
parent e57c8e0a12
commit 7b4b9b18f7
5 changed files with 22 additions and 0 deletions

View File

@@ -585,6 +585,10 @@ namespace
{
return D3DFMT_A8R3G3B2;
}
if (ISBITMASK(0x00ff, 0, 0, 0xff00))
{
return D3DFMT_A8L8; // NVTT versions 1.x wrote this as RGB instead of LUMINANCE
}
break;
case 8:
@@ -609,6 +613,10 @@ namespace
{
return D3DFMT_L8;
}
if (ISBITMASK(0x00ff, 0, 0, 0xff00))
{
return D3DFMT_A8L8; // Some DDS writers assume the bitcount should be 8 instead of 16
}
}
if (16 == ddpf.RGBBitCount)