1
0
mirror of synced 2024-11-12 02:00:50 +01:00

Fix all the DX10 BCN formats for dds imports

This commit is contained in:
KillzXGaming 2019-03-30 11:20:56 -04:00
parent 8a7dde7a2f
commit 3821db69d5
2 changed files with 17 additions and 2 deletions

View File

@ -72,6 +72,18 @@ namespace FirstPlugin
{
switch (dds.DX10header.DXGI_Format)
{
case DDS.DXGI_FORMAT.DXGI_FORMAT_BC1_UNORM:
return GTX.GX2SurfaceFormat.T_BC1_UNORM;
case DDS.DXGI_FORMAT.DXGI_FORMAT_BC1_UNORM_SRGB:
return GTX.GX2SurfaceFormat.T_BC1_SRGB;
case DDS.DXGI_FORMAT.DXGI_FORMAT_BC2_UNORM:
return GTX.GX2SurfaceFormat.T_BC2_UNORM;
case DDS.DXGI_FORMAT.DXGI_FORMAT_BC2_UNORM_SRGB:
return GTX.GX2SurfaceFormat.T_BC2_SRGB;
case DDS.DXGI_FORMAT.DXGI_FORMAT_BC3_UNORM:
return GTX.GX2SurfaceFormat.T_BC3_UNORM;
case DDS.DXGI_FORMAT.DXGI_FORMAT_BC3_UNORM_SRGB:
return GTX.GX2SurfaceFormat.T_BC3_SRGB;
case DDS.DXGI_FORMAT.DXGI_FORMAT_BC4_UNORM:
return GTX.GX2SurfaceFormat.T_BC4_UNORM;
case DDS.DXGI_FORMAT.DXGI_FORMAT_BC4_SNORM:

View File

@ -105,8 +105,11 @@ namespace FirstPlugin
return SurfaceFormat.BC1_UNORM;
case DDS.DXGI_FORMAT.DXGI_FORMAT_BC1_UNORM_SRGB:
return SurfaceFormat.BC1_SRGB;
case DDS.DXGI_FORMAT.DXGI_FORMAT_BC3_UNORM:
case DDS.DXGI_FORMAT.DXGI_FORMAT_BC2_UNORM:
return SurfaceFormat.BC2_UNORM;
case DDS.DXGI_FORMAT.DXGI_FORMAT_BC2_UNORM_SRGB:
return SurfaceFormat.BC2_SRGB;
case DDS.DXGI_FORMAT.DXGI_FORMAT_BC3_UNORM:
return SurfaceFormat.BC3_UNORM;
case DDS.DXGI_FORMAT.DXGI_FORMAT_BC3_UNORM_SRGB:
return SurfaceFormat.BC3_SRGB;