[Bf-blender-cvs] [5d6e5a9076e] blender-v2.92-release: Fix vertex color baking using wrong color space

Brecht Van Lommel noreply at git.blender.org
Fri Jan 22 19:24:24 CET 2021


Commit: 5d6e5a9076e02fdd47c9cf168b368213f6399019
Author: Brecht Van Lommel
Date:   Fri Jan 22 14:03:36 2021 +0100
Branches: blender-v2.92-release
https://developer.blender.org/rB5d6e5a9076e02fdd47c9cf168b368213f6399019

Fix vertex color baking using wrong color space

Now light baking should match the render.

===================================================================

M	source/blender/editors/object/object_bake_api.c

===================================================================

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);
       }
     }
   }



More information about the Bf-blender-cvs mailing list