diff options
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/kernel/closure/bsdf_toon.h | 4 | ||||
-rw-r--r-- | intern/cycles/kernel/closure/bsdf_util.h | 6 |
2 files changed, 6 insertions, 4 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); } diff --git a/intern/cycles/kernel/closure/bsdf_util.h b/intern/cycles/kernel/closure/bsdf_util.h index cfb6321a918..bdfdc206455 100644 --- a/intern/cycles/kernel/closure/bsdf_util.h +++ b/intern/cycles/kernel/closure/bsdf_util.h @@ -30,8 +30,8 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef __OSL_BSDF_H__ -#define __OSL_BSDF_H__ +#ifndef __BSDF_UTIL_H__ +#define __BSDF_UTIL_H__ CCL_NAMESPACE_BEGIN @@ -133,5 +133,5 @@ __device float smooth_step(float edge0, float edge1, float x) CCL_NAMESPACE_END -#endif /* __OSL_BSDF_H__ */ +#endif /* __BSDF_UTIL_H__ */ |