diff options
author | Brecht Van Lommel <brecht@blender.org> | 2020-11-09 19:37:21 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-11-09 19:37:21 +0300 |
commit | cde2bd1828ea9f2f5f6a4b5001593695ccf224d7 (patch) | |
tree | bc5ec65141659b3e0b6b95bc9253498756f13b50 /intern/cycles/kernel/geom/geom_subd_triangle.h | |
parent | bd2dda90b6a35da21446ccfb7db2de0cb972d3f5 (diff) | |
parent | ec6a9322e8723b906089f02ff76b04a7bb7d136f (diff) |
Merge branch 'blender-v2.91-release'
Diffstat (limited to 'intern/cycles/kernel/geom/geom_subd_triangle.h')
-rw-r--r-- | intern/cycles/kernel/geom/geom_subd_triangle.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/intern/cycles/kernel/geom/geom_subd_triangle.h b/intern/cycles/kernel/geom/geom_subd_triangle.h index 2a569852659..9eceb996926 100644 --- a/intern/cycles/kernel/geom/geom_subd_triangle.h +++ b/intern/cycles/kernel/geom/geom_subd_triangle.h @@ -627,10 +627,14 @@ ccl_device_noinline float4 subd_triangle_attribute_float4(KernelGlobals *kg, float4 f0, f1, f2, f3; if (desc.element == ATTR_ELEMENT_CORNER_BYTE) { - f0 = color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, corners[0] + desc.offset)); - f1 = color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, corners[1] + desc.offset)); - f2 = color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, corners[2] + desc.offset)); - f3 = color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, corners[3] + desc.offset)); + f0 = color_srgb_to_linear_v4( + color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, corners[0] + desc.offset))); + f1 = color_srgb_to_linear_v4( + color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, corners[1] + desc.offset))); + f2 = color_srgb_to_linear_v4( + color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, corners[2] + desc.offset))); + f3 = color_srgb_to_linear_v4( + color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, corners[3] + desc.offset))); } else { f0 = kernel_tex_fetch(__attributes_float3, corners[0] + desc.offset); |