1
0
mirror of synced 2024-11-30 18:24:39 +01:00

Force bc7 to use unorm on .dds export so it doesn't darken in external programs.

This commit is contained in:
KillzXGaming 2020-07-11 13:17:46 -04:00
parent f6a7773e43
commit 3d18d542a9

View File

@ -1261,7 +1261,6 @@ namespace Toolbox.Library
case DXGI_FORMAT.DXGI_FORMAT_BC6H_UF16:
case DXGI_FORMAT.DXGI_FORMAT_BC6H_SF16:
case DXGI_FORMAT.DXGI_FORMAT_BC7_UNORM:
case DXGI_FORMAT.DXGI_FORMAT_BC7_UNORM_SRGB:
header.ddspf.flags = (uint)DDPF.FOURCC;
header.ddspf.fourCC = FOURCC_DX10;
if (DX10header == null)
@ -1270,6 +1269,15 @@ namespace Toolbox.Library
IsDX10 = true;
DX10header.DXGI_Format = Format;
break;
case DXGI_FORMAT.DXGI_FORMAT_BC7_UNORM_SRGB:
header.ddspf.flags = (uint)DDPF.FOURCC;
header.ddspf.fourCC = FOURCC_DX10;
if (DX10header == null)
DX10header = new DX10Header();
IsDX10 = true;
DX10header.DXGI_Format = DDS.DXGI_FORMAT.DXGI_FORMAT_BC7_UNORM;
break;
}
}
public bool IsCompressed()