diff options
author | Aaron Carlisle <carlisle.b3d@gmail.com> | 2022-02-23 22:12:48 +0300 |
---|---|---|
committer | Aaron Carlisle <carlisle.b3d@gmail.com> | 2022-02-23 22:12:48 +0300 |
commit | 572acba5d1060bb63a5b95ae2e2529798d5dac5a (patch) | |
tree | 3c05e08471258a7cf0cfcb4129b776f5c9a9ec30 /intern/cycles/kernel | |
parent | b93d4faba8d4dec42354b45e0d26c38ab601adde (diff) | |
parent | 80be63e2a59d5fe009182cec2d167f3636a76470 (diff) |
Merge branch 'blender-v3.1-release'
Diffstat (limited to 'intern/cycles/kernel')
-rw-r--r-- | intern/cycles/kernel/osl/services.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/intern/cycles/kernel/osl/services.cpp b/intern/cycles/kernel/osl/services.cpp index 16e76b37b0b..85bdb47600e 100644 --- a/intern/cycles/kernel/osl/services.cpp +++ b/intern/cycles/kernel/osl/services.cpp @@ -1638,12 +1638,16 @@ bool OSLRenderServices::trace(TraceOpt &options, ray.D = TO_FLOAT3(R); ray.t = (options.maxdist == 1.0e30f) ? FLT_MAX : options.maxdist - options.mindist; ray.time = sd->time; + ray.self.object = OBJECT_NONE; + ray.self.prim = PRIM_NONE; + ray.self.light_object = OBJECT_NONE; + ray.self.light_prim = PRIM_NONE; if (options.mindist == 0.0f) { /* avoid self-intersections */ if (ray.P == sd->P) { - bool transmit = (dot(sd->Ng, ray.D) < 0.0f); - ray.P = ray_offset(sd->P, (transmit) ? -sd->Ng : sd->Ng); + ray.self.object = sd->object; + ray.self.prim = sd->prim; } } else { |