Fix T48799: Particles set as objects cast wrong ray shadows in BI

This commit is contained in:
Sergey Sharybin 2016-07-08 18:10:29 +02:00
parent 8bb69b6157
commit 3b7bce42d7
Notes: blender-bot 2023-02-14 07:46:45 +01:00
Referenced by issue #48799, Particles set as objects cast wrong ray shadows in BI
1 changed files with 6 additions and 0 deletions

View File

@ -125,6 +125,9 @@ static int RE_rayobject_instance_intersect(RayObject *o, Isect *isec)
isec->bv_index[2 * i + 1] = i + 3 * isec->bv_index[2 * i + 1];
}
// Pre-calculate orientation for watertight intersection checks.
isect_ray_tri_watertight_v3_precalc(&isec->isect_precalc, isec->dir);
// raycast
res = RE_rayobject_intersect(obj->target, isec);
@ -168,6 +171,9 @@ static int RE_rayobject_instance_intersect(RayObject *o, Isect *isec)
isec->bv_index[2 * i + 1] = i + 3 * isec->bv_index[2 * i + 1];
}
// Pre-calculate orientation for watertight intersection checks.
isect_ray_tri_watertight_v3_precalc(&isec->isect_precalc, isec->dir);
return res;
}