Graphics/MaterialInstanceLoader: Add sRGB parameter

This commit is contained in:
SirLynix 2023-10-10 21:57:07 +02:00 committed by Jérôme Leclercq
parent 9066fe78bb
commit 55b4e47582
1 changed files with 2 additions and 1 deletions

View File

@ -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 = Image::LoadFromStream(stream, texParams);
if (!image)