Axis-aligned box around an object-space box after objectToWorld, grown by WORLD_BOX_PADDING.
Each axis takes the smallest and largest of the eight corners' coordinates, each worked out as
e[axis] x + e[4 + axis] y + e[8 + axis] z + e[12 + axis] in that order, so the result is the same
to the bit however the loop is written. Written with plain numbers and no arrays: setTransforms
calls it for every moved instance, 10,000 a frame (T2.M1).
The padding of an axis is WORLD_BOX_PADDING times the summed magnitude of its terms,
|mx| max(|x0|, |x1|) + |my| max(|y0|, |y1|) + |mz| max(|z0|, |z1|) + |t|, as the GPU gather pads
its Arvo box (bvhInstanceWorldBox, DIVERGENCES S4). The corners here are exact to double
rounding, so the store into f32 (at most 2^-24 of that sum) leaves at least 15/16 of the padding
around the exact box.
Axis-aligned box around an object-space box after
objectToWorld, grown by WORLD_BOX_PADDING. Each axis takes the smallest and largest of the eight corners' coordinates, each worked out ase[axis] x + e[4 + axis] y + e[8 + axis] z + e[12 + axis]in that order, so the result is the same to the bit however the loop is written. Written with plain numbers and no arrays:setTransformscalls it for every moved instance, 10,000 a frame (T2.M1).The padding of an axis is WORLD_BOX_PADDING times the summed magnitude of its terms,
|mx| max(|x0|, |x1|) + |my| max(|y0|, |y1|) + |mz| max(|z0|, |z1|) + |t|, as the GPU gather pads its Arvo box (bvhInstanceWorldBox, DIVERGENCES S4). The corners here are exact to double rounding, so the store into f32 (at most 2^-24 of that sum) leaves at least 15/16 of the padding around the exact box.