// CAUTION: localToWorld is the transform for the widget of the reflection probe. i.e the world position of the point use to do the cubemap capture (mean it include the local offset)
l.positionWS=probe.localToWorld.GetColumn(3);
l.shapeType=EnvShapeType.None;
l.envShapeType=EnvShapeType.None;
// TODO: Support sphere in the interface
l.shapeType=EnvShapeType.Box;
l.envShapeType=EnvShapeType.Box;
}
// remove scale from the matrix (Scale in this matrix is use to scale the widget)
l.forward=probe.localToWorld.GetColumn(2);
l.forward.Normalize();
l.innerDistance=probe.bounds.extents;
// Artists prefer to have blend distance inside the volume!
// So we let the current UI but we assume blendDistance is an inside factor instead
// Blend distance can't be larger than the max radius
// In this code we redefine a bit the behavior of the reflcetion proble. We separate the projection volume (the proxy of the scene) form the influence volume (what pixel on the screen is affected)
// 1. First determine the projection volume
if (lightData.shapeType == ENVSHAPETYPE_BOX)
{
// CAUTION: localToWorld is the transform use to convert the cubemap capture point to world space (mean it include the offset)
// the center of the bounding box is thus in locals space: positionLS - offsetLS
// We use this formulation as it is the one of legacy unity that was using only AABB box.
// CAUTION: localToWorld is the transform use to convert the cubemap capture point to world space (mean it include the offset)
// the center of the bounding box is thus in locals space: positionLS - offsetLS
// We use this formulation as it is the one of legacy unity that was using only AABB box.