diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-07-25 14:53:30 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-07-25 14:55:03 +0300 |
commit | e7721f5ec8b859d14c982a8a34bc269ab7eed82b (patch) | |
tree | 51edd74da202529732cea9932a4fccb3e263308b | |
parent | a4db868092378b54b95c7a523d4fb841173869e7 (diff) |
Cycles: Fix SSS with spatial splits and motion blur
-rw-r--r-- | intern/cycles/kernel/geom/geom_motion_triangle.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/intern/cycles/kernel/geom/geom_motion_triangle.h b/intern/cycles/kernel/geom/geom_motion_triangle.h index 2fb8e219884..dabba3fb1f0 100644 --- a/intern/cycles/kernel/geom/geom_motion_triangle.h +++ b/intern/cycles/kernel/geom/geom_motion_triangle.h @@ -387,6 +387,12 @@ ccl_device_inline void motion_triangle_intersect_subsurface( float t, u, v; if(ray_triangle_intersect_uv(P, dir, tmax, verts[2], verts[0], verts[1], &u, &v, &t)) { + for(int i = min(max_hits, ss_isect->num_hits) - 1; i >= 0; --i) { + if(ss_isect->hits[i].t == t) { + return; + } + } + ss_isect->num_hits++; int hit; |