diff options
author | Jacques Lucke <mail@jlucke.com> | 2019-10-15 18:37:35 +0300 |
---|---|---|
committer | Jacques Lucke <mail@jlucke.com> | 2019-10-15 18:37:35 +0300 |
commit | e3282fecae7163675156564afc48e8bc11647e1b (patch) | |
tree | a77193844e026050df818ac6a3ce313a0d431732 /intern | |
parent | 4ace5931964be9ed748ac286717b5a0327dcd049 (diff) | |
parent | 2a9b162d94576d0182661179cf0500cfbc85236f (diff) |
Merge branch 'blender-v2.81-release'
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/kernel/shaders/node_mix.osl | 4 | ||||
-rw-r--r-- | intern/cycles/kernel/svm/svm_color_util.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/intern/cycles/kernel/shaders/node_mix.osl b/intern/cycles/kernel/shaders/node_mix.osl index 8caea6803ed..9fbd3391ade 100644 --- a/intern/cycles/kernel/shaders/node_mix.osl +++ b/intern/cycles/kernel/shaders/node_mix.osl @@ -91,12 +91,12 @@ color node_mix_diff(float t, color col1, color col2) color node_mix_dark(float t, color col1, color col2) { - return min(col1, col2) * t + col1 * (1.0 - t); + return mix(col1, min(col1, col2), t); } color node_mix_light(float t, color col1, color col2) { - return max(col1, col2 * t); + return mix(col1, max(col1, col2), t); } color node_mix_dodge(float t, color col1, color col2) diff --git a/intern/cycles/kernel/svm/svm_color_util.h b/intern/cycles/kernel/svm/svm_color_util.h index 0f571eb7253..1a0fa03305e 100644 --- a/intern/cycles/kernel/svm/svm_color_util.h +++ b/intern/cycles/kernel/svm/svm_color_util.h @@ -92,12 +92,12 @@ ccl_device float3 svm_mix_diff(float t, float3 col1, float3 col2) ccl_device float3 svm_mix_dark(float t, float3 col1, float3 col2) { - return min(col1, col2) * t + col1 * (1.0f - t); + return interp(col1, min(col1, col2), t); } ccl_device float3 svm_mix_light(float t, float3 col1, float3 col2) { - return max(col1, col2 * t); + return interp(col1, max(col1, col2), t); } ccl_device float3 svm_mix_dodge(float t, float3 col1, float3 col2) |