[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [29477] trunk/blender/source/blender/ render/intern/source/rayobject_instance.c: bugfix [#22581]

Andre Susano Pinto andresusanopinto at gmail.com
Tue Jun 15 22:00:01 CEST 2010


Revision: 29477
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29477
Author:   jaguarandi
Date:     2010-06-15 22:00:01 +0200 (Tue, 15 Jun 2010)

Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/blender/source/blender/render/intern/source/rayobject_instance.c

Modified: trunk/blender/source/blender/render/intern/source/rayobject_instance.c
===================================================================
--- trunk/blender/source/blender/render/intern/source/rayobject_instance.c	2010-06-15 18:44:47 UTC (rev 29476)
+++ trunk/blender/source/blender/render/intern/source/rayobject_instance.c	2010-06-15 20:00:01 UTC (rev 29477)
@@ -143,6 +143,13 @@
 	{
 		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 );





More information about the Bf-blender-cvs mailing list