示例#1
0
        static void Drawer_SectionLightLoopSettings(LightLoopSettingsUI s, SerializedLightLoopSettings p, Editor owner, bool withOverride)
        {
            //disable temporarily as FrameSettings are nort supported for Baked probe at the moment
            using (new EditorGUI.DisabledScope((owner is HDProbeEditor) && (owner as HDProbeEditor).GetTarget(owner.target).mode != UnityEngine.Rendering.ReflectionProbeMode.Realtime || (owner is HDRenderPipelineEditor) && HDRenderPipelineUI.selectedFrameSettings == HDRenderPipelineUI.SelectedFrameSettings.BakedOrCustomReflection))
            {
                //RenderPipelineSettings hdrpSettings = (GraphicsSettings.renderPipelineAsset as HDRenderPipelineAsset).renderPipelineSettings;
                OverridableSettingsArea area = new OverridableSettingsArea(6);
                FrameSettings           defaultFrameSettings = FrameSettingsUI.GetDefaultFrameSettingsFor(owner);

                // Uncomment if you re-enable LIGHTLOOP_SINGLE_PASS multi_compile in lit*.shader
                //area.Add(p.enableTileAndCluster, tileAndClusterContent, a => p.overridesTileAndCluster = a, () => p.overridesTileAndCluster);
                //and add indent:1 or indent:2 regarding indentation you want

                if (s.isSectionExpandedEnableTileAndCluster.target)
                {
                    area.Add(p.enableFptlForForwardOpaque, fptlForForwardOpaqueContent, () => p.overridesFptlForForwardOpaque, a => p.overridesFptlForForwardOpaque = a, defaultValue: defaultFrameSettings.lightLoopSettings.enableFptlForForwardOpaque);
                    area.Add(p.enableBigTilePrepass, bigTilePrepassContent, () => p.overridesBigTilePrepass, a => p.overridesBigTilePrepass = a, defaultValue: defaultFrameSettings.lightLoopSettings.enableBigTilePrepass);
                    area.Add(p.enableComputeLightEvaluation, computeLightEvaluationContent, () => p.overridesComputeLightEvaluation, a => p.overridesComputeLightEvaluation = a, defaultValue: defaultFrameSettings.lightLoopSettings.enableComputeLightEvaluation);
                    if (s.isSectionExpandedComputeLightEvaluation.target)
                    {
                        area.Add(p.enableComputeLightVariants, computeLightVariantsContent, () => p.overridesComputeLightVariants, a => p.overridesComputeLightVariants             = a, defaultValue: defaultFrameSettings.lightLoopSettings.enableComputeLightVariants, indent: 1);
                        area.Add(p.enableComputeMaterialVariants, computeMaterialVariantsContent, () => p.overridesComputeMaterialVariants, a => p.overridesComputeMaterialVariants = a, defaultValue: defaultFrameSettings.lightLoopSettings.enableComputeMaterialVariants, indent: 1);
                    }
                }

                area.Draw(withOverride);
            }
        }
        static void Drawer_SectionCaptureSettings(CaptureSettingsUI s, SerializedCaptureSettings p, Editor owner)
        {
            OverridableSettingsArea area = new OverridableSettingsArea(16);

            area.Add(p.clearColorMode, clearColorModeContent, () => p.overridesClearColorMode, a => p.overridesClearColorMode = a);
            area.Add(p.backgroundColorHDR, backgroundColorHDRContent, () => p.overridesBackgroundColorHDR, a => p.overridesBackgroundColorHDR = a);
            area.Add(p.clearDepth, clearDepthContent, () => p.overridesClearDepth, a => p.overridesClearDepth     = a);
            area.Add(p.cullingMask, cullingMaskContent, () => p.overridesCullingMask, a => p.overridesCullingMask = a);
            area.Add(p.volumeLayerMask, volumeLayerMaskContent, () => p.overridesVolumeLayerMask, a => p.overridesVolumeLayerMask = a);
            area.Add(p.volumeAnchorOverride, volumeAnchorOverrideContent, () => p.overridesVolumeAnchorOverride, a => p.overridesVolumeAnchorOverride = a);
            area.Add(p.useOcclusionCulling, useOcclusionCullingContent, () => p.overridesUseOcclusionCulling, a => p.overridesUseOcclusionCulling     = a);

            if (!(owner is PlanarReflectionProbeEditor)) //fixed for planar
            {
                area.Add(p.nearClipPlane, nearClipPlaneContent, () => p.overridesNearClip, a => p.overridesNearClip = a);
            }

            area.Add(p.farClipPlane, farClipPlaneContent, () => p.overridesFarClip, a => p.overridesFarClip = a);

            if (owner is PlanarReflectionProbeEditor) //fixed for cubemap
            {
                area.Add(p.fieldOfview, fieldOfViewContent, () => p.overridesFieldOfview, a => p.overridesFieldOfview = a, () => (owner is PlanarReflectionProbeEditor), defaultValue: (owner is PlanarReflectionProbeEditor) ? fieldOfViewDefault : null, forceOverride: true);
            }

            area.Add(p.shadowDistance, shadowDistanceContent, () => p.overridesShadowDistance, a => p.overridesShadowDistance = a);
            area.Add(p.renderingPath, renderingPathContent, () => p.overridesRenderingPath, a => p.overridesRenderingPath     = a);
            area.Draw(withOverride: false);
        }
        static void Drawer_FieldStereoEnabled(FrameSettingsUI s, SerializedFrameSettings p, Editor owner, bool withOverride)
        {
            OverridableSettingsArea area = new OverridableSettingsArea(2);
            FrameSettings           defaultFrameSettings = GetDefaultFrameSettingsFor(owner);

            area.Add(p.enableStereo, stereoContent, () => p.overridesStereo, a => p.overridesStereo = a, defaultValue: defaultFrameSettings.enableStereo);
            //need to add support for xrGraphicConfig to show it
            area.Add(p.xrGraphicsConfig, xrGraphicConfigContent, () => p.overridesXrGraphicSettings, a => p.overridesXrGraphicSettings = a, () => XRGraphicsConfig.tryEnable, defaultValue: defaultFrameSettings.xrGraphicsConfig);
            area.Draw(withOverride);
        }
        static void Drawer_SectionAsyncComputeSettings(SerializedFrameSettings serialized, Editor owner, bool withOverride)
        {
            OverridableSettingsArea area = new OverridableSettingsArea(4);
            FrameSettings           defaultFrameSettings = GetDefaultFrameSettingsFor(owner);

            area.Add(serialized.enableAsyncCompute, asyncComputeContent, () => serialized.overridesAsyncCompute, a => serialized.overridesAsyncCompute             = a, defaultValue: defaultFrameSettings.enableAsyncCompute);
            area.Add(serialized.runBuildLightListAsync, lightListAsyncContent, () => serialized.overrideLightListInAsync, a => serialized.overrideLightListInAsync = a, () => serialized.enableAsyncCompute.boolValue, defaultValue: defaultFrameSettings.runLightListAsync, indent: 1);
            area.Add(serialized.runSSRAsync, SSRAsyncContent, () => serialized.overrideSSRInAsync, a => serialized.overrideSSRInAsync     = a, () => serialized.enableAsyncCompute.boolValue, defaultValue: defaultFrameSettings.runSSRAsync, indent: 1);
            area.Add(serialized.runSSAOAsync, SSAOAsyncContent, () => serialized.overrideSSAOInAsync, a => serialized.overrideSSAOInAsync = a, () => serialized.enableAsyncCompute.boolValue, defaultValue: defaultFrameSettings.runSSAOAsync, indent: 1);
            area.Add(serialized.runContactShadowsAsync, contactShadowsAsyncContent, () => serialized.overrideContactShadowsInAsync, a => serialized.overrideContactShadowsInAsync = a, () => serialized.enableAsyncCompute.boolValue, defaultValue: defaultFrameSettings.runContactShadowsAsync, indent: 1);
            area.Add(serialized.runVolumeVoxelizationAsync, volumeVoxelizationAsyncContent, () => serialized.overrideVolumeVoxelizationInAsync, a => serialized.overrideVolumeVoxelizationInAsync = a, () => serialized.enableAsyncCompute.boolValue, defaultValue: defaultFrameSettings.runVolumeVoxelizationAsync, indent: 1);
            area.Draw(withOverride);
        }
        static void Drawer_SectionAsyncComputeSettings(FrameSettingsUI s, SerializedFrameSettings p, Editor owner, bool withOverride)
        {
            //disable temporarily as FrameSettings are not supported for Baked probe at the moment
            using (new EditorGUI.DisabledScope((owner is HDProbeEditor) && (owner as HDProbeEditor).GetTarget(owner.target).mode != ReflectionProbeMode.Realtime || (owner is HDRenderPipelineEditor) && HDRenderPipelineUI.selectedFrameSettings == HDRenderPipelineUI.SelectedFrameSettings.BakedOrCustomReflection))
            {
                OverridableSettingsArea area = new OverridableSettingsArea(4);
                FrameSettings           defaultFrameSettings = GetDefaultFrameSettingsFor(owner);

                area.Add(p.enableAsyncCompute, asyncComputeContent, () => p.overridesAsyncCompute, a => p.overridesAsyncCompute             = a, defaultValue: defaultFrameSettings.enableAsyncCompute);
                area.Add(p.runBuildLightListAsync, lightListAsyncContent, () => p.overrideLightListInAsync, a => p.overrideLightListInAsync = a, () => p.enableAsyncCompute.boolValue, defaultValue: defaultFrameSettings.runLightListAsync, indent: 1);
                area.Add(p.runSSRAsync, SSRAsyncContent, () => p.overrideSSRInAsync, a => p.overrideSSRInAsync     = a, () => p.enableAsyncCompute.boolValue, defaultValue: defaultFrameSettings.runSSRAsync, indent: 1);
                area.Add(p.runSSAOAsync, SSAOAsyncContent, () => p.overrideSSAOInAsync, a => p.overrideSSAOInAsync = a, () => p.enableAsyncCompute.boolValue, defaultValue: defaultFrameSettings.runSSAOAsync, indent: 1);
                area.Draw(withOverride);
            }
        }
        static void Drawer_SectionRenderingPasses(SerializedFrameSettings serialized, Editor owner, bool withOverride)
        {
            RenderPipelineSettings  hdrpSettings         = GetHDRPAssetFor(owner).renderPipelineSettings;
            FrameSettings           defaultFrameSettings = GetDefaultFrameSettingsFor(owner);
            OverridableSettingsArea area = new OverridableSettingsArea(8);

            area.Add(serialized.enableTransparentPrepass, transparentPrepassContent, () => serialized.overridesTransparentPrepass, a => serialized.overridesTransparentPrepass     = a, defaultValue: defaultFrameSettings.enableTransparentPrepass);
            area.Add(serialized.enableTransparentPostpass, transparentPostpassContent, () => serialized.overridesTransparentPostpass, a => serialized.overridesTransparentPostpass = a, defaultValue: defaultFrameSettings.enableTransparentPostpass);
            area.Add(serialized.enableMotionVectors, motionVectorContent, () => serialized.overridesMotionVectors, a => serialized.overridesMotionVectors = a, () => hdrpSettings.supportMotionVectors, defaultValue: defaultFrameSettings.enableMotionVectors);
            area.Add(serialized.enableObjectMotionVectors, objectMotionVectorsContent, () => serialized.overridesObjectMotionVectors, a => serialized.overridesObjectMotionVectors = a, () => hdrpSettings.supportMotionVectors && serialized.enableMotionVectors.boolValue, defaultValue: defaultFrameSettings.enableObjectMotionVectors, indent: 1);
            area.Add(serialized.enableDecals, decalsContent, () => serialized.overridesDecals, a => serialized.overridesDecals = a, () => hdrpSettings.supportDecals, defaultValue: defaultFrameSettings.enableDecals);
            area.Add(serialized.enableRoughRefraction, roughRefractionContent, () => serialized.overridesRoughRefraction, a => serialized.overridesRoughRefraction = a, defaultValue: defaultFrameSettings.enableRoughRefraction);
            area.Add(serialized.enableDistortion, distortionContent, () => serialized.overridesDistortion, a => serialized.overridesDistortion     = a, () => hdrpSettings.supportDistortion, defaultValue: defaultFrameSettings.enableDistortion);
            area.Add(serialized.enablePostprocess, postprocessContent, () => serialized.overridesPostprocess, a => serialized.overridesPostprocess = a, defaultValue: defaultFrameSettings.enablePostprocess);
            area.Draw(withOverride);
        }
        static void Drawer_SectionRenderingSettings(FrameSettingsUI s, SerializedFrameSettings p, Editor owner, bool withOverride)
        {
            //disable temporarily as FrameSettings are not supported for Baked probe at the moment
            using (new EditorGUI.DisabledScope((owner is HDProbeEditor) && (owner as HDProbeEditor).GetTarget(owner.target).mode != ReflectionProbeMode.Realtime || (owner is HDRenderPipelineEditor) && HDRenderPipelineUI.selectedFrameSettings == HDRenderPipelineUI.SelectedFrameSettings.BakedOrCustomReflection))
            {
                RenderPipelineSettings  hdrpSettings         = (GraphicsSettings.renderPipelineAsset as HDRenderPipelineAsset).renderPipelineSettings;
                FrameSettings           defaultFrameSettings = GetDefaultFrameSettingsFor(owner);
                OverridableSettingsArea area = new OverridableSettingsArea(6);
                LitShaderMode           defaultShaderLitMode;
                switch (hdrpSettings.supportedLitShaderMode)
                {
                case RenderPipelineSettings.SupportedLitShaderMode.ForwardOnly:
                    defaultShaderLitMode = LitShaderMode.Forward;
                    break;

                case RenderPipelineSettings.SupportedLitShaderMode.DeferredOnly:
                    defaultShaderLitMode = LitShaderMode.Deferred;
                    break;

                case RenderPipelineSettings.SupportedLitShaderMode.Both:
                    defaultShaderLitMode = defaultFrameSettings.shaderLitMode;
                    break;

                default:
                    throw new System.ArgumentOutOfRangeException("Unknown ShaderLitMode");
                }

                area.Add(p.litShaderMode, litShaderModeContent, () => p.overridesShaderLitMode, a => p.overridesShaderLitMode = a,
                         () => !GL.wireframe && hdrpSettings.supportedLitShaderMode == RenderPipelineSettings.SupportedLitShaderMode.Both,
                         defaultValue: defaultShaderLitMode);

                bool assetAllowMSAA         = hdrpSettings.supportedLitShaderMode != RenderPipelineSettings.SupportedLitShaderMode.DeferredOnly && hdrpSettings.supportMSAA;
                bool frameSettingsAllowMSAA = p.litShaderMode.enumValueIndex == (int)LitShaderMode.Forward && p.overridesShaderLitMode || !p.overridesShaderLitMode && defaultShaderLitMode == LitShaderMode.Forward;
                area.Add(p.enableMSAA, msaaContent, () => p.overridesMSAA, a => p.overridesMSAA = a,
                         () => !GL.wireframe &&
                         assetAllowMSAA && frameSettingsAllowMSAA,
                         defaultValue: defaultFrameSettings.enableMSAA && hdrpSettings.supportMSAA && !GL.wireframe && (hdrpSettings.supportedLitShaderMode & RenderPipelineSettings.SupportedLitShaderMode.ForwardOnly) != 0 && (p.overridesShaderLitMode && p.litShaderMode.enumValueIndex == (int)LitShaderMode.Forward || !p.overridesShaderLitMode && defaultFrameSettings.shaderLitMode == (int)LitShaderMode.Forward));
                area.Add(p.enableDepthPrepassWithDeferredRendering, depthPrepassWithDeferredRenderingContent, () => p.overridesDepthPrepassWithDeferredRendering, a => p.overridesDepthPrepassWithDeferredRendering = a,
                         () => (defaultFrameSettings.shaderLitMode == LitShaderMode.Deferred && !p.overridesShaderLitMode || p.overridesShaderLitMode && p.litShaderMode.enumValueIndex == (int)LitShaderMode.Deferred) && (hdrpSettings.supportedLitShaderMode & RenderPipelineSettings.SupportedLitShaderMode.DeferredOnly) != 0,
                         defaultValue: defaultFrameSettings.enableDepthPrepassWithDeferredRendering && (hdrpSettings.supportedLitShaderMode & RenderPipelineSettings.SupportedLitShaderMode.DeferredOnly) != 0 && p.litShaderMode.enumValueIndex == (int)LitShaderMode.Deferred);
                area.Add(p.enableAsyncCompute, asyncComputeContent, () => p.overridesAsyncCompute, a => p.overridesAsyncCompute     = a, () => SystemInfo.supportsAsyncCompute, defaultValue: defaultFrameSettings.enableAsyncCompute);
                area.Add(p.enableOpaqueObjects, opaqueObjectsContent, () => p.overridesOpaqueObjects, a => p.overridesOpaqueObjects = a, defaultValue: defaultFrameSettings.enableOpaqueObjects);
                area.Add(p.enableTransparentObjects, transparentObjectsContent, () => p.overridesTransparentObjects, a => p.overridesTransparentObjects = a, defaultValue: defaultFrameSettings.enableTransparentObjects);
                area.Add(p.enableRealtimePlanarReflection, realtimePlanarReflectionContent, () => p.overridesRealtimePlanarReflection, a => p.overridesRealtimePlanarReflection = a, defaultValue: defaultFrameSettings.enableRealtimePlanarReflection);
                area.Draw(withOverride);
            }
        }
示例#8
0
        static void Drawer_SectionCaptureSettings(CaptureSettingsUI s, SerializedCaptureSettings p, Editor owner)
        {
            OverridableSettingsArea area = new OverridableSettingsArea(16);

            area.Add(p.clearColorMode, clearColorModeContent, () => p.overridesClearColorMode, a => p.overridesClearColorMode = a);
            area.Add(p.backgroundColorHDR, backgroundColorHDRContent, () => p.overridesBackgroundColorHDR, a => p.overridesBackgroundColorHDR = a);
            area.Add(p.clearDepth, clearDepthContent, () => p.overridesClearDepth, a => p.overridesClearDepth     = a);
            area.Add(p.cullingMask, cullingMaskContent, () => p.overridesCullingMask, a => p.overridesCullingMask = a);
            area.Add(p.volumeLayerMask, volumeLayerMaskContent, () => p.overridesVolumeLayerMask, a => p.overridesVolumeLayerMask = a);
            area.Add(p.volumeAnchorOverride, volumeAnchorOverrideContent, () => p.overridesVolumeAnchorOverride, a => p.overridesVolumeAnchorOverride = a);
            area.Add(p.useOcclusionCulling, useOcclusionCullingContent, () => p.overridesUseOcclusionCulling, a => p.overridesUseOcclusionCulling     = a);

            if (!(owner is PlanarReflectionProbeEditor)) //fixed for planar
            {
                area.Add(p.nearClipPlane, nearClipPlaneContent, () => p.overridesNearClip, a => p.overridesNearClip = a);
            }

            area.Add(p.farClipPlane, farClipPlaneContent, () => p.overridesFarClip, a => p.overridesFarClip = a);

            if (owner is PlanarReflectionProbeEditor) //fixed for cubemap
            {
                area.Add(p.fieldOfview, fieldOfViewContent, () => p.overridesFieldOfview, a => p.overridesFieldOfview = a, () => (owner is PlanarReflectionProbeEditor), defaultValue: (owner is PlanarReflectionProbeEditor) ? fieldOfViewDefault : null, forceOverride: true);
            }

            area.Add(p.shadowDistance, shadowDistanceContent, () => p.overridesShadowDistance, a => p.overridesShadowDistance = a, () => owner is HDProbeEditor && (owner as HDProbeEditor).GetTarget(owner.target).mode != UnityEngine.Rendering.ReflectionProbeMode.Realtime);
            area.Add(p.renderingPath, renderingPathContent, () => p.overridesRenderingPath, a => p.overridesRenderingPath     = a);
            EditorGUI.BeginChangeCheck();
            area.Draw(withOverride: false);



            //hack while we rely on legacy probe for baking.
            //to remove once we do not rely on them
            if (EditorGUI.EndChangeCheck() && owner is HDReflectionProbeEditor)
            {
                ReflectionProbe rp = owner.target as ReflectionProbe;
                rp.clearFlags      = p.clearColorMode.enumValueIndex == (int)HDAdditionalCameraData.ClearColorMode.Sky ? UnityEngine.Rendering.ReflectionProbeClearFlags.Skybox : UnityEngine.Rendering.ReflectionProbeClearFlags.SolidColor;
                rp.backgroundColor = p.backgroundColorHDR.colorValue;
                rp.hdr             = true;
                rp.cullingMask     = p.cullingMask.intValue;
                rp.nearClipPlane   = p.nearClipPlane.floatValue;
                rp.farClipPlane    = p.farClipPlane.floatValue;
                rp.shadowDistance  = p.shadowDistance.floatValue;
            }
        }
示例#9
0
 static void Drawer_SectionRenderingSettings(FrameSettingsUI s, SerializedFrameSettings p, Editor owner, bool withOverride)
 {
     //disable temporarily as FrameSettings are not supported for Baked probe at the moment
     using (new EditorGUI.DisabledScope((owner is HDProbeEditor) && (owner as HDProbeEditor).GetTarget(owner.target).mode != ReflectionProbeMode.Realtime || (owner is HDRenderPipelineEditor) && HDRenderPipelineUI.selectedFrameSettings == HDRenderPipelineUI.SelectedFrameSettings.BakedOrCustomReflection))
     {
         RenderPipelineSettings  hdrpSettings         = (GraphicsSettings.renderPipelineAsset as HDRenderPipelineAsset).renderPipelineSettings;
         FrameSettings           defaultFrameSettings = GetDefaultFrameSettingsFor(owner);
         OverridableSettingsArea area = new OverridableSettingsArea(6);
         area.Add(p.enableForwardRenderingOnly, forwardRenderingOnlyContent, () => p.overridesForwardRenderingOnly, a => p.overridesForwardRenderingOnly = a, () => !GL.wireframe && !hdrpSettings.supportOnlyForward, defaultValue: defaultFrameSettings.enableForwardRenderingOnly || hdrpSettings.supportOnlyForward);
         area.Add(p.enableMSAA, msaaContent, () => p.overridesMSAA, a => p.overridesMSAA = a, () => hdrpSettings.supportMSAA && (p.enableForwardRenderingOnly.boolValue || (GL.wireframe || hdrpSettings.supportOnlyForward) && (defaultFrameSettings.enableForwardRenderingOnly || hdrpSettings.supportOnlyForward)), defaultValue: defaultFrameSettings.enableMSAA && hdrpSettings.supportMSAA && !GL.wireframe && !hdrpSettings.supportOnlyForward && p.enableForwardRenderingOnly.boolValue, indent: 1);
         area.Add(p.enableDepthPrepassWithDeferredRendering, depthPrepassWithDeferredRenderingContent, () => p.overridesDepthPrepassWithDeferredRendering, a => p.overridesDepthPrepassWithDeferredRendering = a, () => (!defaultFrameSettings.enableForwardRenderingOnly && !p.overridesForwardRenderingOnly || p.overridesForwardRenderingOnly && !p.enableForwardRenderingOnly.boolValue) && !hdrpSettings.supportOnlyForward, defaultValue: defaultFrameSettings.enableDepthPrepassWithDeferredRendering && !hdrpSettings.supportOnlyForward && !p.enableForwardRenderingOnly.boolValue);
         area.Add(p.enableAsyncCompute, asyncComputeContent, () => p.overridesAsyncCompute, a => p.overridesAsyncCompute     = a, () => SystemInfo.supportsAsyncCompute, defaultValue: defaultFrameSettings.enableAsyncCompute);
         area.Add(p.enableOpaqueObjects, opaqueObjectsContent, () => p.overridesOpaqueObjects, a => p.overridesOpaqueObjects = a, defaultValue: defaultFrameSettings.enableOpaqueObjects);
         area.Add(p.enableTransparentObjects, transparentObjectsContent, () => p.overridesTransparentObjects, a => p.overridesTransparentObjects = a, defaultValue: defaultFrameSettings.enableTransparentObjects);
         area.Add(p.enableRealtimePlanarReflection, realtimePlanarReflectionContent, () => p.overridesRealtimePlanarReflection, a => p.overridesRealtimePlanarReflection = a, defaultValue: defaultFrameSettings.enableRealtimePlanarReflection);
         area.Draw(withOverride);
     }
 }
        static void Drawer_SectionRenderingSettings(SerializedFrameSettings serialized, Editor owner, bool withOverride)
        {
            RenderPipelineSettings  hdrpSettings         = GetHDRPAssetFor(owner).renderPipelineSettings;
            FrameSettings           defaultFrameSettings = GetDefaultFrameSettingsFor(owner);
            OverridableSettingsArea area = new OverridableSettingsArea(6);
            LitShaderMode           defaultShaderLitMode;

            switch (hdrpSettings.supportedLitShaderMode)
            {
            case RenderPipelineSettings.SupportedLitShaderMode.ForwardOnly:
                defaultShaderLitMode = LitShaderMode.Forward;
                break;

            case RenderPipelineSettings.SupportedLitShaderMode.DeferredOnly:
                defaultShaderLitMode = LitShaderMode.Deferred;
                break;

            case RenderPipelineSettings.SupportedLitShaderMode.Both:
                defaultShaderLitMode = defaultFrameSettings.shaderLitMode;
                break;

            default:
                throw new System.ArgumentOutOfRangeException("Unknown ShaderLitMode");
            }

            area.Add(serialized.litShaderMode, litShaderModeContent, () => serialized.overridesShaderLitMode, a => serialized.overridesShaderLitMode = a,
                     () => !GL.wireframe && hdrpSettings.supportedLitShaderMode == RenderPipelineSettings.SupportedLitShaderMode.Both,
                     defaultValue: defaultShaderLitMode);

            bool assetAllowMSAA         = hdrpSettings.supportedLitShaderMode != RenderPipelineSettings.SupportedLitShaderMode.DeferredOnly && hdrpSettings.supportMSAA;
            bool frameSettingsAllowMSAA = serialized.litShaderMode.enumValueIndex == (int)LitShaderMode.Forward && serialized.overridesShaderLitMode || !serialized.overridesShaderLitMode && defaultShaderLitMode == LitShaderMode.Forward;

            area.Add(serialized.enableMSAA, msaaContent, () => serialized.overridesMSAA, a => serialized.overridesMSAA = a,
                     () => !GL.wireframe &&
                     assetAllowMSAA && frameSettingsAllowMSAA,
                     defaultValue: defaultFrameSettings.enableMSAA && hdrpSettings.supportMSAA && !GL.wireframe && (hdrpSettings.supportedLitShaderMode & RenderPipelineSettings.SupportedLitShaderMode.ForwardOnly) != 0 && (serialized.overridesShaderLitMode && serialized.litShaderMode.enumValueIndex == (int)LitShaderMode.Forward || !serialized.overridesShaderLitMode && defaultFrameSettings.shaderLitMode == (int)LitShaderMode.Forward));
            area.Add(serialized.enableDepthPrepassWithDeferredRendering, depthPrepassWithDeferredRenderingContent, () => serialized.overridesDepthPrepassWithDeferredRendering, a => serialized.overridesDepthPrepassWithDeferredRendering = a,
                     () => (defaultFrameSettings.shaderLitMode == LitShaderMode.Deferred && !serialized.overridesShaderLitMode || serialized.overridesShaderLitMode && serialized.litShaderMode.enumValueIndex == (int)LitShaderMode.Deferred) && (hdrpSettings.supportedLitShaderMode & RenderPipelineSettings.SupportedLitShaderMode.DeferredOnly) != 0,
                     defaultValue: defaultFrameSettings.enableDepthPrepassWithDeferredRendering && (hdrpSettings.supportedLitShaderMode & RenderPipelineSettings.SupportedLitShaderMode.DeferredOnly) != 0 && serialized.litShaderMode.enumValueIndex == (int)LitShaderMode.Deferred);
            area.Add(serialized.enableOpaqueObjects, opaqueObjectsContent, () => serialized.overridesOpaqueObjects, a => serialized.overridesOpaqueObjects = a, defaultValue: defaultFrameSettings.enableOpaqueObjects);
            area.Add(serialized.enableTransparentObjects, transparentObjectsContent, () => serialized.overridesTransparentObjects, a => serialized.overridesTransparentObjects = a, defaultValue: defaultFrameSettings.enableTransparentObjects);
            area.Add(serialized.enableRealtimePlanarReflection, realtimePlanarReflectionContent, () => serialized.overridesRealtimePlanarReflection, a => serialized.overridesRealtimePlanarReflection = a, defaultValue: defaultFrameSettings.enableRealtimePlanarReflection);
            area.Draw(withOverride);
        }
 static void Drawer_SectionRenderingPasses(FrameSettingsUI s, SerializedFrameSettings p, Editor owner, bool withOverride)
 {
     //disable temporarily as FrameSettings are not supported for Baked probe at the moment
     using (new EditorGUI.DisabledScope((owner is HDProbeEditor) && (owner as HDProbeEditor).GetTarget(owner.target).mode != ReflectionProbeMode.Realtime || (owner is HDRenderPipelineEditor) && HDRenderPipelineUI.selectedFrameSettings == HDRenderPipelineUI.SelectedFrameSettings.BakedOrCustomReflection))
     {
         RenderPipelineSettings  hdrpSettings         = (GraphicsSettings.renderPipelineAsset as HDRenderPipelineAsset).renderPipelineSettings;
         FrameSettings           defaultFrameSettings = GetDefaultFrameSettingsFor(owner);
         OverridableSettingsArea area = new OverridableSettingsArea(8);
         area.Add(p.enableTransparentPrepass, transparentPrepassContent, () => p.overridesTransparentPrepass, a => p.overridesTransparentPrepass     = a, defaultValue: defaultFrameSettings.enableTransparentPrepass);
         area.Add(p.enableTransparentPostpass, transparentPostpassContent, () => p.overridesTransparentPostpass, a => p.overridesTransparentPostpass = a, defaultValue: defaultFrameSettings.enableTransparentPostpass);
         area.Add(p.enableMotionVectors, motionVectorContent, () => p.overridesMotionVectors, a => p.overridesMotionVectors = a, () => hdrpSettings.supportMotionVectors, defaultValue: defaultFrameSettings.enableMotionVectors);
         area.Add(p.enableObjectMotionVectors, objectMotionVectorsContent, () => p.overridesObjectMotionVectors, a => p.overridesObjectMotionVectors = a, () => hdrpSettings.supportMotionVectors && p.enableMotionVectors.boolValue, defaultValue: defaultFrameSettings.enableObjectMotionVectors, indent: 1);
         area.Add(p.enableDecals, decalsContent, () => p.overridesDecals, a => p.overridesDecals = a, () => hdrpSettings.supportDecals, defaultValue: defaultFrameSettings.enableDecals);
         area.Add(p.enableRoughRefraction, roughRefractionContent, () => p.overridesRoughRefraction, a => p.overridesRoughRefraction = a, defaultValue: defaultFrameSettings.enableRoughRefraction);
         area.Add(p.enableDistortion, distortionContent, () => p.overridesDistortion, a => p.overridesDistortion     = a, defaultValue: defaultFrameSettings.enableDistortion);
         area.Add(p.enablePostprocess, postprocessContent, () => p.overridesPostprocess, a => p.overridesPostprocess = a, defaultValue: defaultFrameSettings.enablePostprocess);
         area.Draw(withOverride);
     }
 }
        static void Drawer_SectionLightingSettings(SerializedFrameSettings serialized, Editor owner, bool withOverride)
        {
            RenderPipelineSettings  hdrpSettings         = GetHDRPAssetFor(owner).renderPipelineSettings;
            FrameSettings           defaultFrameSettings = GetDefaultFrameSettingsFor(owner);
            OverridableSettingsArea area = new OverridableSettingsArea(10);

            area.Add(serialized.enableShadow, shadowContent, () => serialized.overridesShadow, a => serialized.overridesShadow = a, defaultValue: defaultFrameSettings.enableShadow);
            area.Add(serialized.enableContactShadow, contactShadowContent, () => serialized.overridesContactShadow, a => serialized.overridesContactShadow = a, defaultValue: defaultFrameSettings.enableContactShadows);
            area.Add(serialized.enableShadowMask, shadowMaskContent, () => serialized.overridesShadowMask, a => serialized.overridesShadowMask             = a, () => hdrpSettings.supportShadowMask, defaultValue: defaultFrameSettings.enableShadowMask);
            area.Add(serialized.enableSSR, ssrContent, () => serialized.overridesSSR, a => serialized.overridesSSR     = a, () => hdrpSettings.supportSSR, defaultValue: defaultFrameSettings.enableSSR);
            area.Add(serialized.enableSSAO, ssaoContent, () => serialized.overridesSSAO, a => serialized.overridesSSAO = a, () => hdrpSettings.supportSSAO, defaultValue: defaultFrameSettings.enableSSAO);
            area.Add(serialized.enableSubsurfaceScattering, subsurfaceScatteringContent, () => serialized.overridesSubsurfaceScattering, a => serialized.overridesSubsurfaceScattering = a, () => hdrpSettings.supportSubsurfaceScattering, defaultValue: defaultFrameSettings.enableSubsurfaceScattering);
            area.Add(serialized.enableTransmission, transmissionContent, () => serialized.overridesTransmission, a => serialized.overridesTransmission = a, defaultValue: defaultFrameSettings.enableTransmission);
            area.Add(serialized.enableAtmosphericScattering, atmosphericScatteringContent, () => serialized.overridesAtmosphericScaterring, a => serialized.overridesAtmosphericScaterring = a, defaultValue: defaultFrameSettings.enableAtmosphericScattering);
            area.Add(serialized.enableVolumetrics, volumetricContent, () => serialized.overridesVolumetrics, a => serialized.overridesVolumetrics = a, () => hdrpSettings.supportVolumetrics && serialized.enableAtmosphericScattering.boolValue, defaultValue: defaultFrameSettings.enableAtmosphericScattering, indent: 1);
            area.Add(serialized.enableReprojectionForVolumetrics, reprojectionForVolumetricsContent, () => serialized.overridesProjectionForVolumetrics, a => serialized.overridesProjectionForVolumetrics = a, () => hdrpSettings.supportVolumetrics && serialized.enableAtmosphericScattering.boolValue, defaultValue: defaultFrameSettings.enableVolumetrics, indent: 1);
            area.Add(serialized.enableLightLayers, lightLayerContent, () => serialized.overridesLightLayers, a => serialized.overridesLightLayers = a, () => hdrpSettings.supportLightLayers, defaultValue: defaultFrameSettings.enableLightLayers);
            area.Draw(withOverride);
        }
 static void Drawer_SectionLightingSettings(FrameSettingsUI s, SerializedFrameSettings p, Editor owner, bool withOverride)
 {
     //disable temporarily as FrameSettings are not supported for Baked probe at the moment
     using (new EditorGUI.DisabledScope((owner is HDProbeEditor) && (owner as HDProbeEditor).GetTarget(owner.target).mode != ReflectionProbeMode.Realtime || (owner is HDRenderPipelineEditor) && HDRenderPipelineUI.selectedFrameSettings == HDRenderPipelineUI.SelectedFrameSettings.BakedOrCustomReflection))
     {
         RenderPipelineSettings  hdrpSettings         = (GraphicsSettings.renderPipelineAsset as HDRenderPipelineAsset).renderPipelineSettings;
         FrameSettings           defaultFrameSettings = GetDefaultFrameSettingsFor(owner);
         OverridableSettingsArea area = new OverridableSettingsArea(10);
         area.Add(p.enableShadow, shadowContent, () => p.overridesShadow, a => p.overridesShadow = a, defaultValue: defaultFrameSettings.enableShadow);
         area.Add(p.enableContactShadow, contactShadowContent, () => p.overridesContactShadow, a => p.overridesContactShadow = a, defaultValue: defaultFrameSettings.enableContactShadows);
         area.Add(p.enableShadowMask, shadowMaskContent, () => p.overridesShadowMask, a => p.overridesShadowMask             = a, () => hdrpSettings.supportShadowMask, defaultValue: defaultFrameSettings.enableShadowMask);
         area.Add(p.enableSSR, ssrContent, () => p.overridesSSR, a => p.overridesSSR     = a, () => hdrpSettings.supportSSR, defaultValue: defaultFrameSettings.enableSSR);
         area.Add(p.enableSSAO, ssaoContent, () => p.overridesSSAO, a => p.overridesSSAO = a, () => hdrpSettings.supportSSAO, defaultValue: defaultFrameSettings.enableSSAO);
         area.Add(p.enableSubsurfaceScattering, subsurfaceScatteringContent, () => p.overridesSubsurfaceScattering, a => p.overridesSubsurfaceScattering = a, () => hdrpSettings.supportSubsurfaceScattering, defaultValue: defaultFrameSettings.enableSubsurfaceScattering);
         area.Add(p.enableTransmission, transmissionContent, () => p.overridesTransmission, a => p.overridesTransmission = a, defaultValue: defaultFrameSettings.enableTransmission);
         area.Add(p.enableAtmosphericScattering, atmosphericScatteringContent, () => p.overridesAtmosphericScaterring, a => p.overridesAtmosphericScaterring = a, defaultValue: defaultFrameSettings.enableAtmosphericScattering);
         area.Add(p.enableVolumetrics, volumetricContent, () => p.overridesVolumetrics, a => p.overridesVolumetrics = a, () => hdrpSettings.supportVolumetrics && p.enableAtmosphericScattering.boolValue, defaultValue: defaultFrameSettings.enableAtmosphericScattering, indent: 1);
         area.Add(p.enableReprojectionForVolumetrics, reprojectionForVolumetricsContent, () => p.overridesProjectionForVolumetrics, a => p.overridesProjectionForVolumetrics = a, () => hdrpSettings.supportVolumetrics && p.enableAtmosphericScattering.boolValue, defaultValue: defaultFrameSettings.enableVolumetrics, indent: 1);
         area.Add(p.enableLightLayers, lightLayerContent, () => p.overridesLightLayers, a => p.overridesLightLayers = a, () => hdrpSettings.supportLightLayers, defaultValue: defaultFrameSettings.enableLightLayers);
         area.Draw(withOverride);
     }
 }