Commit: 99a6392fb5aed1831616bfd1ab4a00c345b32d51
Author: Brecht Van Lommel
Date: Wed Feb 23 18:38:51 2022 +0100
Branches: blender-v3.1-release
https://developer.blender.org/rB99a6392fb5aed1831616bfd1ab4a00c345b32d51
Fix OSL trace() not being fully updated for ray offsetting removal
This was the last place still using the ray_offset() function.
===================================================================
M intern/cycles/kernel/osl/services.cpp
===================================================================
diff --git a/intern/cycles/kernel/osl/services.cpp
b/intern/cycles/kernel/osl/services.cpp
index d79e7dfa8a5..67e8a40d4c3 100644
--- a/intern/cycles/kernel/osl/services.cpp
+++ b/intern/cycles/kernel/osl/services.cpp
@@ -1651,12 +1651,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 {
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs