- Home /
Which DXGI_FORMAT is supported by Unity's DDS Importer
Hi,
I've created a texture atlas plugin to be used inside the Unity Editor. It collects the albedo, bump and metallic textures from the materials and bakes a new texture from each with proper mip-maps. All file loading, copying and saving is done inside the native plugin using DirectXTex library.
The albedo is saved as DXGI_FORMAT_BC1_UNORM, the metallic as DXGI_FORMAT_BC3_UNORM. I've tried to export the bump map as DXGI_FORMAT_BC5_UNORM but Unity refuses to load it, so these are saved as TGAs for the moment.
The reimported atlas texture is darker than the original ones, because the color space in the inspector preview says "Linear" (source textures have "sRGB"). Switching to some BCX_UNORM_SRGB didn't work. Unity refused to import it.
Which DXGI_FORMAT can be used for storing the bump map as DXTmn ? (I assumed it would be DXGI_FORMAT_BC5_XXXX) Because I don't want to loose the proper mip maps.
Thanks in advance, M.
Did some testing and saved the source textures (GetNativeTexturePtr() -> ID3D11Resource -> SaveToDDS):
Source: PNG Unity: DXT1 sRGB DDS: DXGI_FOR$$anonymous$$AT_BC1_UNOR$$anonymous$$_SRGB
Source: TGA Unity: DXT5 sRGB DDS: DXGI_FOR$$anonymous$$AT_BC3_UNOR$$anonymous$$_SRGB
Source: PNG (Normal$$anonymous$$ap) Unity: DXTnm Linear DDS: DXGI_FOR$$anonymous$$AT_BC3_UNOR$$anonymous$$
Unity isn't able to re-import any of the _SRGB formats :(
Your answer
![](https://koobas.hobune.stream/wayback/20220612082427im_/https://answers.unity.com/themes/thub/images/avi.jpg)