From 25a52ed40783cf74bece39e21731bed12d9a2a49 Mon Sep 17 00:00:00 2001 From: lisyarus Date: Mon, 19 Jul 2021 12:48:07 +0300 Subject: [PATCH] Convert vertex colors from sRGB to linear RGB in mesh exporter --- tools/convert-mesh/bin/convert-mesh.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/convert-mesh/bin/convert-mesh.py b/tools/convert-mesh/bin/convert-mesh.py index 409bfff0..d93664d6 100644 --- a/tools/convert-mesh/bin/convert-mesh.py +++ b/tools/convert-mesh/bin/convert-mesh.py @@ -153,7 +153,7 @@ if colors: for i in range(len(vertex_colors)): c = 0 for k in (3, 2, 1, 0): - c = (c << 8) | int(max(0, min(255, vertex_colors[i][k] * 255))) + c = (c << 8) | int(max(0, min(255, pow(vertex_colors[i][k], 2.2) * 255))) vertex_colors[i] = c if armature: