From 64c21b3f329a2d7e8798be792373e08a6975cddb Mon Sep 17 00:00:00 2001 From: Robin Allen Date: Tue, 3 Mar 2020 22:30:41 +0000 Subject: [PATCH] Create sRGB textures if the texture file specifies sRGB --- src/bgfx_p.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bgfx_p.h b/src/bgfx_p.h index 6473b3703..bf6bd801d 100644 --- a/src/bgfx_p.h +++ b/src/bgfx_p.h @@ -4155,6 +4155,10 @@ constexpr uint64_t kSortKeyComputeProgramMask = uint64_t(BGFX_CONFIG_MAX_PROGRA return BGFX_INVALID_HANDLE; } + if (imageContainer.m_srgb) { + _flags |= BGFX_TEXTURE_SRGB; + } + TextureHandle handle = { m_textureHandle.alloc() }; BX_WARN(isValid(handle), "Failed to allocate texture handle.");