Reputation: 11
I saved a *.dds image using the NVIDIA texture tools plugin for Photoshop, and I chose the D3DFMT_A32R32G32B32F format. Because it's a floating point format, I thought the data was saved in Linear color space. However, when I loaded the file in my code, I found I needed to perform a conversion from sRGB to Linear, to get the result I expected.
Is this correct? Is D3DFMT_A32R32G32B32F an sRGB format? Or, is it a bug in the Photoshop plugin? Or, is the format agnostic in terms of color space?
On a related note, I chose the legacy D3DFMT_A32R32G32B32F format because the plugin doesn't seem to support the newer DXGI formats.
Upvotes: 1
Views: 216
Reputation: 41057
Float data could technically be in any color space. In DirectXTex I generally consider float formats to be linear space, but the old plug-in could certainly be treating everything as sRGB.
Traditional DDSURFACEDESC2
DDS file doesn't explicitly encode color space. Some hacks by NVIDIA tried to add sRGB vs. Linear, but it was never widely adopted. With the DX10
extended header that uses DXGI_FORMAT
, only a few formats explicitly indicate sRGB, so even there you can also technically have data in various color spaces.
See this blog post
Upvotes: 1