Fix T48848: Cycles - Camera Culling - Camera Culling removes objects which are still in frame

This commit is contained in:
Sergey Sharybin 2016-07-18 14:29:37 +02:00
parent 6533d72056
commit bbc1507871

@ -253,11 +253,10 @@ static bool object_boundbox_clip(Scene *scene,
boundbox[3 * i + 1],
boundbox[3 * i + 2]);
p = transform_point(&tfm, p);
p = transform_point(&worldtondc, p);
p = transform_perspective(&worldtondc, p);
if(p.z >= -margin) {
all_behind = false;
}
p /= p.z;
bb_min = min(bb_min, p);
bb_max = max(bb_max, p);
}