Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Dietrich <kevin.dietrich@mailoo.org>2014-04-28 19:38:34 +0400
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2014-04-29 16:03:09 +0400
commit1dcf95684929806e80e3d0b514c8690cd757b1bd (patch)
tree2d5c4cc6a3c73996ec99e8f2c068dd92f3bc839a /intern/cycles/kernel/svm
parent4ff3ebf45c8b7fe6911fb40d43384dc04d7a132b (diff)
Fix for wrong behavior of 'darken' blend mode with factor.
The formula was not consistent across Blender and behaved strangely, now it is a simple linear blend between color1 and min(color1, color2). Reviewed By: brecht Differential Revision: https://developer.blender.org/D489
Diffstat (limited to 'intern/cycles/kernel/svm')
-rw-r--r--intern/cycles/kernel/svm/svm_mix.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/intern/cycles/kernel/svm/svm_mix.h b/intern/cycles/kernel/svm/svm_mix.h
index 4e834b7c500..015925ab01e 100644
--- a/intern/cycles/kernel/svm/svm_mix.h
+++ b/intern/cycles/kernel/svm/svm_mix.h
@@ -89,7 +89,7 @@ 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);
+ return min(col1, col2)*t + col1*(1.0 - t);
}
ccl_device float3 svm_mix_light(float t, float3 col1, float3 col2)