static void Drawer_SectionLightLoopSettings(LightLoopSettingsUI s, SerializedLightLoopSettings p, Editor owner) { // Uncomment if you re-enable LIGHTLOOP_SINGLE_PASS multi_compile in lit*.shader //EditorGUILayout.PropertyField(p.enableTileAndCluster, _.GetContent("Enable Tile And Cluster")); //EditorGUI.indentLevel++; GUILayout.BeginVertical(); if (s.isSectionExpandedEnableTileAndCluster.target) { EditorGUILayout.PropertyField(p.enableFptlForForwardOpaque, _.GetContent("Enable FPTL For Forward Opaque")); EditorGUILayout.PropertyField(p.enableBigTilePrepass, _.GetContent("Enable Big Tile Prepass")); EditorGUILayout.PropertyField(p.enableComputeLightEvaluation, _.GetContent("Enable Compute Light Evaluation")); GUILayout.BeginVertical(); if (s.isSectionExpandedComputeLightEvaluation.target) { EditorGUI.indentLevel++; EditorGUILayout.PropertyField(p.enableComputeLightVariants, _.GetContent("Enable Compute Light Variants")); EditorGUILayout.PropertyField(p.enableComputeMaterialVariants, _.GetContent("Enable Compute Material Variants")); EditorGUI.indentLevel--; } GUILayout.EndVertical(); } GUILayout.EndVertical(); //EditorGUI.indentLevel--; }
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); } }
//separated to add enum popup on default frame settings internal static CED.IDrawer InspectorInnerbox(bool withOverride = true) { return(CED.Group( SectionRenderingPasses(withOverride), SectionRenderingSettings(withOverride), SectionLightingSettings(withOverride), CED.Select( (s, d, o) => s.lightLoopSettings, (s, d, o) => d.lightLoopSettings, LightLoopSettingsUI.SectionLightLoopSettings(withOverride) ) )); }
//separated to add enum popup on default frame settings internal static CED.IDrawer InspectorInnerbox(bool withOverride = true) { return(CED.Group( SectionRenderingPasses(withOverride), SectionRenderingSettings(withOverride), SectionLightingSettings(withOverride), SectionAsyncComputeSettings(withOverride), CED.Select( (serialized, owner) => serialized.lightLoopSettings, LightLoopSettingsUI.SectionLightLoopSettings(withOverride) ) )); }
//separated to add enum popup on default frame settings internal static CED.IDrawer InspectorInnerbox(bool withOverride = true, bool withXR = true) { return(CED.Group( SectionRenderingPasses(withOverride), SectionRenderingSettings(withOverride), CED.FadeGroup( (s, d, o, i) => new AnimBool(withXR), FadeOption.None, SectionXRSettings(withOverride)), SectionLightingSettings(withOverride), CED.Select( (s, d, o) => s.lightLoopSettings, (s, d, o) => d.lightLoopSettings, LightLoopSettingsUI.SectionLightLoopSettings(withOverride) ) )); }