Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-07-25 14:53:30 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-07-25 14:55:03 +0300
commite7721f5ec8b859d14c982a8a34bc269ab7eed82b (patch)
tree51edd74da202529732cea9932a4fccb3e263308b /intern
parenta4db868092378b54b95c7a523d4fb841173869e7 (diff)
Cycles: Fix SSS with spatial splits and motion blur
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/kernel/geom/geom_motion_triangle.h6
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;