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:
authorAndre Susano Pinto <andresusanopinto@gmail.com>2010-06-16 00:00:01 +0400
committerAndre Susano Pinto <andresusanopinto@gmail.com>2010-06-16 00:00:01 +0400
commitbb7062abcb4169f8f7676ebef54d5e6b8b27218a (patch)
tree306b13a6e3777e4e11e0d79453a11063f07dd845 /source/blender/render
parent3e3d2b7a4cfc38f673bdeb48707b95c7bd50049a (diff)
bugfix [#22581]
- on instances last hit optimization was jumping to the last hit face inside an instance without doing space transformation. Fixed by making last hit optimization jump to the root node of the instance instead of the last hit face.
Diffstat (limited to 'source/blender/render')
-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 );