Hi lu_zero! I think what might be going on here is that the game might be expecting a DX10 DXGI format that ends in _SRGB, like
Custom_Samurai_d_HI.dds uses) or
DXGI_FORMAT_BC3_UNORM_SRGB, but nvtt_export is writing a file using the
DXGI_FORMAT_BC3_UNORM DXGI format.
There’s two parts to this: the first is that nvtt_export doesn’t use the DXT10 DDS extension by default, and the second is specifying the
_SRGB DXGI format.
To use the DXT10 DDS extension, set Format to BC3, then scroll to the bottom and check DDS: Use DXT10 Header:
What’s going on here is that DirectX 9-era DDS files specify their format using the
DDS_PIXELFORMAT struct, which doesn’t have any information about whether the file should be read as linear or sRGB. The optional DXT10 header extension (from the mid-2000s) adds a DXGI format field which allows saying whether a file is
BC3_UNORM_SRGB – but some older DDS readers will crash if they see the DXT10 header, so nvtt_export doesn’t write it by default. My best guess is that the game might be loading the DX9 BC3 file as if it had the
BC3_UNORM DXGI format, when it should load it with the
The second part is that nvtt_export writes the
BC3_UNORM enum without
BC3_UNORM_SRGB by default (it might in the future though! I’ve written a bit more about this here). These contain the same data (the colors are sRGB in both files); the difference is that the GPU automatically performs sRGB-to-linear conversion on the fly for the latter.
Changing this is a bit trickier, and requires a hex editor at the moment (I often use HxD or ImHex; the design is that ideally the engine should do this format changing, but it looks like the engine doesn’t do that here). After writing the DDS file using nvtt_export.exe, load the DDS file into your hex editor. You should see something like this:
Click on the byte at offset 0x80 and change it from 4D (hexadecimal for 77, which is DXGI_FORMAT_BC3_UNORM) to 4E (hexadecimal for 78, which is DXGI_FORMAT_BC3_UNORM_SRGB):
Then save the file back out. If
UNORM was the root cause, the texture should now load correctly!
Hope this helps, and let me know if this works!