diff options
Diffstat (limited to 'intern/cycles/kernel/closure/bsdf_toon.h')
-rw-r--r-- | intern/cycles/kernel/closure/bsdf_toon.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/intern/cycles/kernel/closure/bsdf_toon.h b/intern/cycles/kernel/closure/bsdf_toon.h index ac66114ca76..9aa25a6c0c6 100644 --- a/intern/cycles/kernel/closure/bsdf_toon.h +++ b/intern/cycles/kernel/closure/bsdf_toon.h @@ -52,12 +52,14 @@ __device void bsdf_diffuse_toon_blur(ShaderClosure *sc, float roughness) __device float3 bsdf_toon_get_intensity(float max_angle, float smooth, float angle) { - float is = 0.0f; + float is; if(angle < max_angle) is = 1.0f; else if(angle < (max_angle + smooth) && smooth != 0.0f) is = (1.0f - (angle - max_angle)/smooth); + else + is = 0.0f return make_float3(is, is, is); } |