From 55b4e47582576da76188c3521d0e175811564ea9 Mon Sep 17 00:00:00 2001 From: SirLynix Date: Tue, 10 Oct 2023 21:57:07 +0200 Subject: [PATCH] Graphics/MaterialInstanceLoader: Add sRGB parameter --- src/Nazara/Graphics/Formats/TextureLoader.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Nazara/Graphics/Formats/TextureLoader.cpp b/src/Nazara/Graphics/Formats/TextureLoader.cpp index 0cf6538fd..fc18979ec 100644 --- a/src/Nazara/Graphics/Formats/TextureLoader.cpp +++ b/src/Nazara/Graphics/Formats/TextureLoader.cpp @@ -25,7 +25,8 @@ namespace Nz { TextureParams texParams; texParams.renderDevice = Graphics::Instance()->GetRenderDevice(); - // TODO: Set format as sRGB + if (parameters.custom.GetBooleanParameter("sRGB").GetValueOr(false)) + texParams.loadFormat = PixelFormat::RGBA8_SRGB; std::shared_ptr image = Image::LoadFromStream(stream, texParams); if (!image)