diff options
Diffstat (limited to 'intern/cycles/kernel/util/color.h')
-rw-r--r-- | intern/cycles/kernel/util/color.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/intern/cycles/kernel/util/color.h b/intern/cycles/kernel/util/color.h index 28978d873d6..c85ef262d88 100644 --- a/intern/cycles/kernel/util/color.h +++ b/intern/cycles/kernel/util/color.h @@ -14,6 +14,11 @@ ccl_device float3 xyz_to_rgb(KernelGlobals kg, float3 xyz) dot(float4_to_float3(kernel_data.film.xyz_to_b), xyz)); } +ccl_device float3 xyz_to_rgb_clamped(KernelGlobals kg, float3 xyz) +{ + return max(xyz_to_rgb(kg, xyz), zero_float3()); +} + ccl_device float3 rec709_to_rgb(KernelGlobals kg, float3 rec709) { return (kernel_data.film.is_rec709) ? |