# DirectX 11 GenerateMips only works with premultiplied alpha?

The GenerateMips method in the ID3D11DeviceContext allows generation of mipmaps at runtime, which is fine for fully opaque textures. However, when this method is used with transparent textures that do not have premultiplied alpha, the resulting mip levels tend to have black outlines at the transparency edges. For instance, this PNG texture, loaded through WIC and processed with GenerateMips, produces mipmaps with edge pixels that are way too dark:

My question: Is there any way to specify to that this texture uses non-premultiplied alpha, so that DirectX can generate more correct mip levels?

• The details of GenerateMips is left to the driver writer, so you will get variable quality out of it. Is there some reason why you can't generate the mips offline? How about using WIC? See DirectXTex. – Chuck Walbourn Jan 19 '15 at 4:16