Exemple #1
0
        static bool HasShadowQualitySettingsUI(HDShadowQuality quality, SerializedHDLight serialized, Editor owner)
        {
            // Handle quality where there is nothing to draw directly here
            // No PCSS for now with directional light
            if (quality == HDShadowQuality.Medium || quality == HDShadowQuality.Low)
            {
                return(false);
            }

            // Draw shadow settings using the current shadow algorithm
            HDShadowInitParameters hdShadowInitParameters = (GraphicsSettings.renderPipelineAsset as HDRenderPipelineAsset).currentPlatformRenderPipelineSettings.hdShadowInitParams;
            LightType lightType = (LightType)serialized.settings.lightType.enumValueIndex;

            if (hdShadowInitParameters.shadowQuality == HDShadowQuality.VeryHigh)
            {
                // For very high settings shadow punctial lights we do not use the Very high settings but rather the High
                if (quality == HDShadowQuality.High && lightType != LightType.Directional)
                {
                    return(true);
                }
                // Only the directional can access the very high shadow settings
                else if (quality == HDShadowQuality.VeryHigh && lightType == LightType.Directional)
                {
                    return(true);
                }
                return(false);
            }

            return(hdShadowInitParameters.shadowQuality == quality);
        }
        static bool HasShadowQualitySettingsUI(HDShadowQuality quality, SerializedHDLight serialized, Editor owner)
        {
            // Handle quality where there is nothing to draw directly here
            // No PCSS for now with directional light
            if (quality == HDShadowQuality.Medium || quality == HDShadowQuality.Low)
                return false;

            // Draw shadow settings using the current shadow algorithm
            HDShadowInitParameters hdShadowInitParameters = (GraphicsSettings.renderPipelineAsset as HDRenderPipelineAsset).renderPipelineSettings.hdShadowInitParams;
            return hdShadowInitParameters.shadowQuality == quality;
        }
Exemple #3
0
        static bool IsShadowSettings(HDShadowQuality quality, SerializedHDLight serialized, Editor owner)
        {
            //handle quality where there is nothing to draw directly here
            if (quality == HDShadowQuality.Medium || quality == HDShadowQuality.Low)
            {
                return(false);
            }

            // Draw shadow settings using the current shadow algorithm
            HDShadowInitParameters hdShadowInitParameters = (GraphicsSettings.renderPipelineAsset as HDRenderPipelineAsset).renderPipelineSettings.hdShadowInitParams;
            HDShadowQuality        currentAlgorithm;

            if (serialized.settings.lightType.enumValueIndex == (int)LightType.Directional)
            {
                currentAlgorithm = hdShadowInitParameters.directionalShadowQuality;
            }
            else
            {
                currentAlgorithm = hdShadowInitParameters.punctualShadowQuality;
            }
            return(currentAlgorithm == quality);
        }