From 8e286a2cc02273af3662d39341424dbe967e4978 Mon Sep 17 00:00:00 2001 From: lisyarus Date: Sun, 15 Jan 2023 22:57:14 +0300 Subject: [PATCH] Load gltf textures as sRGB --- libs/gfx/source/gltf_mesh.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/gfx/source/gltf_mesh.cpp b/libs/gfx/source/gltf_mesh.cpp index fc1e4540..d69d691c 100644 --- a/libs/gfx/source/gltf_mesh.cpp +++ b/libs/gfx/source/gltf_mesh.cpp @@ -69,7 +69,7 @@ namespace psemek::gfx { auto data = uri_loader(texture.uri); auto & target = textures_.emplace_back(); - target.load(gfx::read_png(io::memory_istream(data.data(), data.data() + data.size()))); + target.load_srgb(gfx::read_png(io::memory_istream(data.data(), data.data() + data.size()))); target.linear_mipmap_filter(); target.anisotropy(); target.generate_mipmap();