Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R8G8B8A8_UNORM_SRGB -> R8G8B8A8_UNORM conversion does not work correctly [Convert + Texconv] #600

Open
iMrShadow opened this issue Mar 26, 2025 · 0 comments
Labels

Comments

@iMrShadow
Copy link

iMrShadow commented Mar 26, 2025

Hello!

I am using a .NET wrapper of DirectXTex for an application that displays textures. Since I am displaying them to the screen, I am converting them to R8G8B8A8 Linear format.

The issues comes with sRGB textures. I had trouble converting them to Linear space using the single image convert function. I verified that the correct TEX_FILTER_FLAGS flags are used (TEX_FILTER_SRGB_IN or TEX_FILTER_DEFAULT) and that the convert function works (tested with: R16B16G16A16_UNORM, R32G32B32A32_FLOAT, A8_UNORM, R8G8_UNORM).

Texconv has the same issue. Using the options -f R8G8B8A8_UNORM and -srgbi, while the input format is R8G8B8A8_UNORM_SRGB, the pixel data stays the same. In the DDS file, only the enum has changed.

So far this issue has only happened when trying to convert R8G8B8A8_UNORM_SRGB to R8G8B8A8_UNORM (on Windows with RX 580).

Thanks

@iMrShadow iMrShadow changed the title Possible issue with Convert function? R8G8B8A8 sRGB -> Linear conversion does not work Mar 28, 2025
@iMrShadow iMrShadow changed the title R8G8B8A8 sRGB -> Linear conversion does not work R8G8B8A8_UNORM_SRGB -> R8G8B8A8_UNORM conversion does not work correctly [Convert + Texconv] Mar 30, 2025
@walbourn walbourn added the bug label Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants