From ae440703411486c9219fa0ff54e471eea64afb58 Mon Sep 17 00:00:00 2001 From: William Leeson Date: Thu, 13 Jan 2022 17:20:50 +0100 Subject: Cycles: explicitly skip self-intersection Remember the last intersected primitive and skip any intersections with the same primitive. Ref D12954 --- intern/cycles/kernel/bvh/metal.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'intern/cycles/kernel/bvh/metal.h') diff --git a/intern/cycles/kernel/bvh/metal.h b/intern/cycles/kernel/bvh/metal.h index 55456d15f50..5ab413d9314 100644 --- a/intern/cycles/kernel/bvh/metal.h +++ b/intern/cycles/kernel/bvh/metal.h @@ -15,6 +15,7 @@ */ struct MetalRTIntersectionPayload { + RaySelfPrimitives self; uint visibility; float u, v; int prim; @@ -25,6 +26,7 @@ struct MetalRTIntersectionPayload { }; struct MetalRTIntersectionLocalPayload { + RaySelfPrimitives self; uint local_object; uint lcg_state; short max_hits; @@ -34,6 +36,7 @@ struct MetalRTIntersectionLocalPayload { }; struct MetalRTIntersectionShadowPayload { + RaySelfPrimitives self; uint visibility; #if defined(__METALRT_MOTION__) float time; -- cgit v1.2.3