示例#1
0
        /// <summary>This method performs the calculations. The <b>eye</b> and <b>tgt</b> arguments store the position in .xyz, and the radius in .w, both in world space.</summary>
        public static float Calculate(int layers, Vector4 eye, Vector4 tgt)
        {
            var occlusion = 0.0f;

            CalculateRaycast(layers, eye, tgt, ref occlusion);

            if (occlusion < 1.0f)
            {
                SgtHelper.InvokeCalculateOcclusion(layers, eye, tgt, ref occlusion);
            }

            return(Mathf.Clamp01(occlusion));
        }