diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-05-04 01:34:51 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-05-04 01:34:51 +0400 |
commit | 838949c3e76eb140bb0f776fbbd0fd61fac08f49 (patch) | |
tree | 5f59c6410a1ad65d9dee684368676f499907cf65 /intern/cycles/kernel/kernel_subsurface.h | |
parent | 879859e0cc4e0176e1a054fa63e94c3e506a0a7c (diff) |
Fix #35207: addition to previous fix to avoid OSL getting uninitialized
ray differentials for lighting, which could cause bad texture filtering
artifacts or performance.
Diffstat (limited to 'intern/cycles/kernel/kernel_subsurface.h')
-rw-r--r-- | intern/cycles/kernel/kernel_subsurface.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/intern/cycles/kernel/kernel_subsurface.h b/intern/cycles/kernel/kernel_subsurface.h index f503c488a34..f7bccf71976 100644 --- a/intern/cycles/kernel/kernel_subsurface.h +++ b/intern/cycles/kernel/kernel_subsurface.h @@ -203,8 +203,7 @@ __device void subsurface_scatter_step(KernelGlobals *kg, ShaderData *sd, int sta ray.P = p1; ray.D = normalize_len(p2 - p1, &ray.t); ray.dP = sd->dP; - ray.dD.dx = make_float3(0.0f, 0.0f, 0.0f); - ray.dD.dy = make_float3(0.0f, 0.0f, 0.0f); + ray.dD = differential3_zero(); ray.time = sd->time; /* intersect with the same object. if multiple intersections are |