Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2021-01-22 16:03:36 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-01-22 21:24:13 +0300
commit5d6e5a9076e02fdd47c9cf168b368213f6399019 (patch)
tree965b86aba9ea7087364893eccac17d6962d2c50f /source/blender/editors/object/object_bake_api.c
parente845467d93fe35e222d14b0bb27472ccb309b321 (diff)
Fix vertex color baking using wrong color space
Now light baking should match the render.
Diffstat (limited to 'source/blender/editors/object/object_bake_api.c')
-rw-r--r--source/blender/editors/object/object_bake_api.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c
index 113a0395e8c..db9e51a490d 100644
--- a/source/blender/editors/object/object_bake_api.c
+++ b/source/blender/editors/object/object_bake_api.c
@@ -1062,10 +1062,10 @@ static bool bake_targets_output_vertex_colors(BakeTargets *targets, Object *ob)
bake_result_to_rgba(rgba, &result[mloop->v * num_channels], num_channels);
if (is_noncolor) {
- linearrgb_to_srgb_uchar4(&mloopcol->r, rgba);
+ unit_float_to_uchar_clamp_v4(&mloopcol->r, rgba);
}
else {
- unit_float_to_uchar_clamp_v4(&mloopcol->r, rgba);
+ linearrgb_to_srgb_uchar4(&mloopcol->r, rgba);
}
}
}