Fixed bugs in sec ray gen and bvh generation (needed one more call to generate root bvh)