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:
Diffstat (limited to 'intern/cycles/kernel/svm/svm_math_util.h')
-rw-r--r--intern/cycles/kernel/svm/svm_math_util.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/intern/cycles/kernel/svm/svm_math_util.h b/intern/cycles/kernel/svm/svm_math_util.h
index 6d13a0d8e02..01547b60014 100644
--- a/intern/cycles/kernel/svm/svm_math_util.h
+++ b/intern/cycles/kernel/svm/svm_math_util.h
@@ -164,6 +164,9 @@ ccl_device float3 svm_math_blackbody_color(float t) {
ccl_device_inline float3 svm_math_gamma_color(float3 color, float gamma)
{
+ if(gamma == 0.0f)
+ return make_float3(1.0f, 1.0f, 1.0f);
+
if(color.x > 0.0f)
color.x = powf(color.x, gamma);
if(color.y > 0.0f)