1
0
mirror of synced 2024-11-12 02:00:50 +01:00

Fix RGBA8 srgb being too bright when set in image importer

This commit is contained in:
KillzXGaming 2019-06-05 16:38:01 -04:00
parent 60e77f3dd1
commit 41fcaa1a73
6 changed files with 1 additions and 1 deletions

Binary file not shown.

View File

@ -555,7 +555,7 @@ namespace Switch_Toolbox.Library
}
public static unsafe byte[] EncodePixelBlock(Byte[] data, int width, int height, DDS.DXGI_FORMAT format, float AlphaRef = 0.5f)
{
if (format == DDS.DXGI_FORMAT.DXGI_FORMAT_R8G8B8A8_UNORM)
if (format == DDS.DXGI_FORMAT.DXGI_FORMAT_R8G8B8A8_UNORM || format == DDS.DXGI_FORMAT.DXGI_FORMAT_R8G8B8A8_UNORM_SRGB)
return data;
return Convert(data, width, height, DXGI_FORMAT.R8G8B8A8_UNORM, (DXGI_FORMAT)format);