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:
Diffstat (limited to 'source/blender/render/intern/source/rayobject_instance.c')
-rw-r--r--source/blender/render/intern/source/rayobject_instance.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/render/intern/source/rayobject_instance.c b/source/blender/render/intern/source/rayobject_instance.c
index c36ab454f3d..25765c4763a 100644
--- a/source/blender/render/intern/source/rayobject_instance.c
+++ b/source/blender/render/intern/source/rayobject_instance.c
@@ -143,6 +143,13 @@ static int RE_rayobject_instance_intersect(RayObject *o, Isect *isec)
{
isec->labda *= dist / isec->dist;
isec->hit.ob = obj->ob;
+
+#ifdef RT_USE_LAST_HIT
+ // TODO support for last hit optimization in instances that can jump
+ // directly to the last hit face.
+ // For now it jumps directly to the last-hit instance root node.
+ isec->last_hit = RE_rayobject_unalignRayAPI((RayObject*) obj);
+#endif
}
isec->dist = dist;
VECCOPY( isec->start, start );