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
diff options
context:
space:
mode:
authorWilliam Leeson <leesonw>2022-01-13 19:20:50 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-01-26 19:51:05 +0300
commitae440703411486c9219fa0ff54e471eea64afb58 (patch)
tree285443f953e6e89de24dad6ad5012ed2d488e182 /intern/cycles/kernel/integrator/subsurface_disk.h
parenta9bb4607660a2f68a78732fd7f5d5280d8075dcb (diff)
Cycles: explicitly skip self-intersection
Remember the last intersected primitive and skip any intersections with the same primitive. Ref D12954
Diffstat (limited to 'intern/cycles/kernel/integrator/subsurface_disk.h')
-rw-r--r--intern/cycles/kernel/integrator/subsurface_disk.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/intern/cycles/kernel/integrator/subsurface_disk.h b/intern/cycles/kernel/integrator/subsurface_disk.h
index cc6f5048cda..f5641d1fa5e 100644
--- a/intern/cycles/kernel/integrator/subsurface_disk.h
+++ b/intern/cycles/kernel/integrator/subsurface_disk.h
@@ -99,6 +99,10 @@ ccl_device_inline bool subsurface_disk(KernelGlobals kg,
ray.dP = ray_dP;
ray.dD = differential_zero_compact();
ray.time = time;
+ ray.self.object = OBJECT_NONE;
+ ray.self.prim = PRIM_NONE;
+ ray.self.light_object = OBJECT_NONE;
+ ray.self.light_prim = OBJECT_NONE;
/* Intersect with the same object. if multiple intersections are found it
* will use at most BSSRDF_MAX_HITS hits, a random subset of all hits. */