refine shadows optimization with bounding boxes