svn merge -r 20651:20822 https://svn.blender.org/svnroot/bf-blender/branches/blender2...
authorAndre Susano Pinto <andresusanopinto@gmail.com>
Fri, 12 Jun 2009 02:29:38 +0000 (02:29 +0000)
committerAndre Susano Pinto <andresusanopinto@gmail.com>
Fri, 12 Jun 2009 02:29:38 +0000 (02:29 +0000)
1  2 
source/blender/render/intern/source/rayshade.c
source/blender/render/intern/source/rendercore.c

@@@ -1425,11 -1313,10 +1426,11 @@@ static void ray_trace_shadow_tra(Isect 
                        
                        /* adapt isect struct */
                        VECCOPY(is->start, shi.co);
 -                      is->oborig= RAY_OBJECT_SET(&R, shi.obi);
 -                      is->faceorig= (RayFace*)shi.vlr;
 +
 +                      is->orig.ob   = shi.obi;
 +                      is->orig.face = shi.vlr;
  
-                       ray_trace_shadow_tra(is, depth-1, traflag | RAY_TRA);
+                       ray_trace_shadow_tra(is, origshi, depth-1, traflag | RAY_TRA);
                }
        }
  }
@@@ -2261,14 -2123,10 +2262,14 @@@ void ray_shadow(ShadeInput *shi, LampRe
                                isec.col[0]= isec.col[1]= isec.col[2]=  1.0f;
                                isec.col[3]= 1.0f;
  
-                               ray_trace_shadow_tra(&isec, DEPTH_SHADOW_TRA, 0);
+                               ray_trace_shadow_tra(&isec, shi, DEPTH_SHADOW_TRA, 0);
                                QUATCOPY(shadfac, isec.col);
                        }
 -                      else if(RE_ray_tree_intersect(R.raytree, &isec)) shadfac[3]= 0.0f;
 +                      else
 +                      {
 +                              assert(0);
 +                              if(RE_rayobject_raycast(R.raytree, &isec)) shadfac[3]= 0.0f;
 +                      }
                }
                else {
                        ray_shadow_jitter(shi, lar, lampco, shadfac, &isec);