NVTT for Photoshop creates mipmaps with white edges

Hi,

I’m using NVTT for Photoshop to create DDS files and I’ve noticed that the mipmaps generated for textures have a white border. For instance here’s an example of it:


mipmaps.dds (170.8 KB)

Any tips on how to avoid this happening? This behaviour is new in 2021.1.1 and 2021.2. It didn’t happen in 2020.1.3, but I’m unable to find the exe for that so I can’t reinstall it.

Hi gravesenlasse! It looks like this is a bug in the current version of the Texture Tools Exporter, where premultiplied alpha mipmapping isn’t being applied during mipmapping, and we have a fix which will be released with the next version.

What’s going on here is that the RGB channels of mip 0 look like this:

and the alpha channel looks like this:

Version 2021.2.0 didn’t apply premultiplied alpha here, so it resized each channel independently. The effect is that the white region around the rectangle, which should be invisible (it has 0 alpha) bleeds into the semitransparent black rectangle!

With premultiplied alpha, we should get this instead (showing mip 5):

One short-term workaround is to fill the area around the rectangle with a transparent black color if possible. The longer-term fix (making premultiplied alpha work as intended) will be in the next release.

Thanks!