diff options
Diffstat (limited to 'source/blender/blenkernel/intern/geometry_component_mesh.cc')
-rw-r--r-- | source/blender/blenkernel/intern/geometry_component_mesh.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/geometry_component_mesh.cc b/source/blender/blenkernel/intern/geometry_component_mesh.cc index df451b5db1d..150cc4589c8 100644 --- a/source/blender/blenkernel/intern/geometry_component_mesh.cc +++ b/source/blender/blenkernel/intern/geometry_component_mesh.cc @@ -814,14 +814,16 @@ static void set_loop_uv(MLoopUV &uv, const float2 &co) static Color4f get_loop_color(const MLoopCol &col) { - Color4f value; - rgba_uchar_to_float(value, &col.r); - return value; + Color4f srgb_color; + rgba_uchar_to_float(srgb_color, &col.r); + Color4f linear_color; + srgb_to_linearrgb_v4(linear_color, srgb_color); + return linear_color; } -static void set_loop_color(MLoopCol &col, const Color4f &value) +static void set_loop_color(MLoopCol &col, const Color4f &linear_color) { - rgba_float_to_uchar(&col.r, value); + linearrgb_to_srgb_uchar4(&col.r, linear_color); } static float get_crease(const MEdge &edge) |