Merge branch 'blender2.7'

This commit is contained in:
Brecht Van Lommel 2018-12-27 10:53:02 +01:00
commit 5216dd5fce
3 changed files with 11 additions and 7 deletions

@ -874,13 +874,15 @@ ccl_device_inline float3 curve_refine(KernelGlobals *kg,
float gd = isect->v;
/* direction from inside to surface of curve */
sd->Ng = (dif - tg * sd->u * l) / (P_curve[0].w + sd->u * l * gd);
float denom = fmaxf(P_curve[0].w + sd->u * l * gd, 1e-8f);
sd->Ng = (dif - tg * sd->u * l) / denom;
/* adjustment for changing radius */
if(gd != 0.0f) {
sd->Ng = sd->Ng - gd * tg;
sd->Ng = normalize(sd->Ng);
}
sd->Ng = normalize(sd->Ng);
}
sd->N = sd->Ng;

@ -1 +1 @@
Subproject commit d3349b42856d00c278f72f2a5909a6c96b9cdb5e
Subproject commit fec9a7e88c8686830e9210099818a61489e699e4

@ -93,11 +93,13 @@
#endif
/* Use to suppress '-Wimplicit-fallthrough' (in place of 'break'). */
#ifndef ATTR_FALLTHROUGH
# if defined(__GNUC__) && (__GNUC__ >= 7) /* gcc7.0+ only */
# define ATTR_FALLTHROUGH __attribute__((fallthrough))
# else
# define ATTR_FALLTHROUGH ((void)0)
# endif
#endif
/* Declare the memory alignment in Bytes. */
#if defined(_WIN32) && !defined(FREE_WINDOWS)