Exemple #1
0
        public void UpdateShadow()
        {
            //Shadows
            m_shadowLayerDistances = new float[32];
            for (int i = 0; i < m_shadowLayerDistances.Length; i++)
            {
                string layerName = LayerMask.LayerToName(i);
                switch (layerName)
                {
                case "Default":
                case "Water":
                case "PW_VFX":
                    m_shadowLayerDistances[i] = 0f;
                    break;

                case "PW_Object_Small":
                    m_shadowLayerDistances[i] = GaiaUtils.CalculateShadowCullingLayerValue(ShadowCullingType.Small, QualitySettings.shadowDistance, 0f, 0f, 5f);
                    break;

                case "PW_Object_Medium":
                    m_shadowLayerDistances[i] = GaiaUtils.CalculateShadowCullingLayerValue(ShadowCullingType.Medium, QualitySettings.shadowDistance, 0f, 3f, 0f);
                    break;

                case "PW_Object_Large":
                    m_shadowLayerDistances[i] = GaiaUtils.CalculateShadowCullingLayerValue(ShadowCullingType.Large, QualitySettings.shadowDistance, 1f, 0f, 0f);
                    break;

                default:
                    m_shadowLayerDistances[i] = 0f;
                    break;
                }
            }
        }