This project has moved and is read-only. For the latest updates, please go here.


Problems converting greyscale PNG to BC3_UNORM_SRGB


Hi, I'm using the texconv to convert a grayscale png file to a dds file. I use the command:
-srgb -f -BC3_UNORM_SRGB
It turns out many pixels in the dds file looks carnation or aqua.
I'm a newer in dds so can you tell me how this problem comes out.

file attachments

Closed Jul 16, 2013 at 7:08 PM by walbourn
The result of the compression looks quite reasonable for this input image.


walbourn wrote Jul 12, 2013 at 7:04 PM

Copied from DirectXTK discussion thread

ify wrote Jul 14, 2013 at 1:26 PM


walbourn wrote Jul 16, 2013 at 6:56 PM

The repro case here is a greyscale image stored in PNG as RGBA32. It loads as DXGI_FORMAT_B8G8R8A8_UNORM as expected. It does not contain the sRGB tag so it doesn't load as DXGI_FORMAT_B8G8R8A8_UNORM_SRGB.

walbourn wrote Jul 16, 2013 at 7:08 PM

I don't actually see any problem converting your test image to either BC3_UNORM or BC3_UNORM_SRGB. The results are quite reasonable for the block compression and there's no significant color shift.

MSE between the original and the BC3 version comes out as {"[red: 0.000058 green: 0.000013 blue: 0.000058]"} which means there's a little more error in R and B and a little less error in G which is to be expected for a 5:6:5: color.

walbourn wrote Jul 16, 2013 at 7:09 PM

Here's the compression result as a legacy DDS that can be viewed by most standard viewers.