public SerializedFrameSettings(SerializedProperty root)
        {
            this.root = root;

            enableShadow                            = root.Find((FrameSettings d) => d.enableShadow);
            enableContactShadow                     = root.Find((FrameSettings d) => d.enableContactShadows);
            enableSSR                               = root.Find((FrameSettings d) => d.enableSSR);
            enableSSAO                              = root.Find((FrameSettings d) => d.enableSSAO);
            enableSubsurfaceScattering              = root.Find((FrameSettings d) => d.enableSubsurfaceScattering);
            enableTransmission                      = root.Find((FrameSettings d) => d.enableTransmission);
            enableAtmosphericScattering             = root.Find((FrameSettings d) => d.enableAtmosphericScattering);
            enableVolumetric                        = root.Find((FrameSettings d) => d.enableVolumetrics);
            enableLightLayers                       = root.Find((FrameSettings d) => d.enableLightLayers);
            diffuseGlobalDimmer                     = root.Find((FrameSettings d) => d.diffuseGlobalDimmer);
            specularGlobalDimmer                    = root.Find((FrameSettings d) => d.specularGlobalDimmer);
            enableForwardRenderingOnly              = root.Find((FrameSettings d) => d.enableForwardRenderingOnly);
            enableDepthPrepassWithDeferredRendering = root.Find((FrameSettings d) => d.enableDepthPrepassWithDeferredRendering);
            enableTransparentPrepass                = root.Find((FrameSettings d) => d.enableTransparentPrepass);
            enableMotionVectors                     = root.Find((FrameSettings d) => d.enableMotionVectors);
            enableObjectMotionVectors               = root.Find((FrameSettings d) => d.enableObjectMotionVectors);
            enableDecals                            = root.Find((FrameSettings d) => d.enableDecals);
            enableRoughRefraction                   = root.Find((FrameSettings d) => d.enableRoughRefraction);
            enableTransparentPostpass               = root.Find((FrameSettings d) => d.enableTransparentPostpass);
            enableDistortion                        = root.Find((FrameSettings d) => d.enableDistortion);
            enablePostprocess                       = root.Find((FrameSettings d) => d.enablePostprocess);
            enableStereo                            = root.Find((FrameSettings d) => d.enableStereo);
            enableAsyncCompute                      = root.Find((FrameSettings d) => d.enableAsyncCompute);
            enableOpaqueObjects                     = root.Find((FrameSettings d) => d.enableOpaqueObjects);
            enableTransparentObjects                = root.Find((FrameSettings d) => d.enableTransparentObjects);
            enableMSAA                              = root.Find((FrameSettings d) => d.enableMSAA);
            enableShadowMask                        = root.Find((FrameSettings d) => d.enableShadowMask);

            lightLoopSettings = new SerializedLightLoopSettings(root.Find((FrameSettings d) => d.lightLoopSettings));
        }
Exemplo n.º 2
0
        static void Drawer_SectionLightLoopSettings(SerializedLightLoopSettings serialized, Editor owner, bool withOverride)
        {
            //disable temporarily as FrameSettings are not supported for Baked probe at the moment
            using (new EditorGUI.DisabledScope((owner is IHDProbeEditor) && (owner as IHDProbeEditor).GetTarget(owner.target).mode != ProbeSettings.Mode.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 (serialized.enableTileAndCluster.boolValue)
                {
                    area.Add(serialized.enableFptlForForwardOpaque, fptlForForwardOpaqueContent, () => serialized.overridesFptlForForwardOpaque, a => serialized.overridesFptlForForwardOpaque = a, defaultValue: defaultFrameSettings.lightLoopSettings.enableFptlForForwardOpaque);
                    area.Add(serialized.enableBigTilePrepass, bigTilePrepassContent, () => serialized.overridesBigTilePrepass, a => serialized.overridesBigTilePrepass = a, defaultValue: defaultFrameSettings.lightLoopSettings.enableBigTilePrepass);
                    area.Add(serialized.enableComputeLightEvaluation, computeLightEvaluationContent, () => serialized.overridesComputeLightEvaluation, a => serialized.overridesComputeLightEvaluation = a, defaultValue: defaultFrameSettings.lightLoopSettings.enableComputeLightEvaluation);
                    if (serialized.enableComputeLightEvaluation.boolValue)
                    {
                        area.Add(serialized.enableComputeLightVariants, computeLightVariantsContent, () => serialized.overridesComputeLightVariants, a => serialized.overridesComputeLightVariants             = a, defaultValue: defaultFrameSettings.lightLoopSettings.enableComputeLightVariants, indent: 1);
                        area.Add(serialized.enableComputeMaterialVariants, computeMaterialVariantsContent, () => serialized.overridesComputeMaterialVariants, a => serialized.overridesComputeMaterialVariants = a, defaultValue: defaultFrameSettings.lightLoopSettings.enableComputeMaterialVariants, indent: 1);
                    }
                }

                area.Draw(withOverride);
            }
        }
        public SerializedFrameSettings(SerializedProperty root)
        {
            this.root = root;

            enableShadow                            = root.Find((FrameSettings d) => d.enableShadow);
            enableContactShadow                     = root.Find((FrameSettings d) => d.enableContactShadows);
            enableSSR                               = root.Find((FrameSettings d) => d.enableSSR);
            enableSSAO                              = root.Find((FrameSettings d) => d.enableSSAO);
            enableSubsurfaceScattering              = root.Find((FrameSettings d) => d.enableSubsurfaceScattering);
            enableTransmission                      = root.Find((FrameSettings d) => d.enableTransmission);
            enableAtmosphericScattering             = root.Find((FrameSettings d) => d.enableAtmosphericScattering);
            enableVolumetrics                       = root.Find((FrameSettings d) => d.enableVolumetrics);
            enableReprojectionForVolumetrics        = root.Find((FrameSettings d) => d.enableReprojectionForVolumetrics);
            enableLightLayers                       = root.Find((FrameSettings d) => d.enableLightLayers);
            diffuseGlobalDimmer                     = root.Find((FrameSettings d) => d.diffuseGlobalDimmer);
            specularGlobalDimmer                    = root.Find((FrameSettings d) => d.specularGlobalDimmer);
            litShaderMode                           = root.Find((FrameSettings d) => d.shaderLitMode);
            enableDepthPrepassWithDeferredRendering = root.Find((FrameSettings d) => d.enableDepthPrepassWithDeferredRendering);
            enableTransparentPrepass                = root.Find((FrameSettings d) => d.enableTransparentPrepass);
            enableMotionVectors                     = root.Find((FrameSettings d) => d.enableMotionVectors);
            enableObjectMotionVectors               = root.Find((FrameSettings d) => d.enableObjectMotionVectors);
            enableDecals                            = root.Find((FrameSettings d) => d.enableDecals);
            enableRoughRefraction                   = root.Find((FrameSettings d) => d.enableRoughRefraction);
            enableTransparentPostpass               = root.Find((FrameSettings d) => d.enableTransparentPostpass);
            enableDistortion                        = root.Find((FrameSettings d) => d.enableDistortion);
            enablePostprocess                       = root.Find((FrameSettings d) => d.enablePostprocess);
            enableAsyncCompute                      = root.Find((FrameSettings d) => d.enableAsyncCompute);
            runBuildLightListAsync                  = root.Find((FrameSettings d) => d.runLightListAsync);
            runSSRAsync                             = root.Find((FrameSettings d) => d.runSSRAsync);
            runSSAOAsync                            = root.Find((FrameSettings d) => d.runSSAOAsync);
            runContactShadowsAsync                  = root.Find((FrameSettings d) => d.runContactShadowsAsync);
            runVolumeVoxelizationAsync              = root.Find((FrameSettings d) => d.runVolumeVoxelizationAsync);
            enableOpaqueObjects                     = root.Find((FrameSettings d) => d.enableOpaqueObjects);
            enableTransparentObjects                = root.Find((FrameSettings d) => d.enableTransparentObjects);
            enableRealtimePlanarReflection          = root.Find((FrameSettings d) => d.enableRealtimePlanarReflection);
            enableMSAA                              = root.Find((FrameSettings d) => d.enableMSAA);
            enableShadowMask                        = root.Find((FrameSettings d) => d.enableShadowMask);
            overrides                               = root.Find((FrameSettings d) => d.overrides);

            lightLoopSettings = new SerializedLightLoopSettings(root.Find((FrameSettings d) => d.lightLoopSettings));
        }