浏览代码

[HDCameraEditor] fixde fade group issue

/main
Frédéric Vauchelles 7 年前
当前提交
d1775233
共有 6 个文件被更改,包括 29 次插入26 次删除
  1. 10
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Camera/HDCameraEditor.Drawers.cs
  2. 6
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Camera/SerializedFrameSettingsUI.cs
  3. 5
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Camera/SerializedLightLoopSettingsUI.cs
  4. 24
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/HDRenderPipelineInspector.cs
  5. 8
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/HDReflectionProbeEditor.Data.cs
  6. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/HDReflectionProbeEditor.Drawers.cs

10
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Camera/HDCameraEditor.Drawers.cs


CED.Action(Drawer_FieldDepth),
CED.Action(Drawer_FieldRenderTarget)),
CED.FadeGroup(
(s, d, o, i) => s.isSectionAvailableXRSettings.faded,
(s, d, o, i) => s.isSectionAvailableXRSettings,
false,
CED.FoldoutGroup(
"XR Settings",

// Render Loop Settings
CED.FadeGroup(
(s, d, o, i) => s.isSectionAvailableRenderLoopSettings.faded,
(s, d, o, i) => s.isSectionAvailableRenderLoopSettings,
false,
CED.Select(
(s, d, o) => s.serializedFrameSettingsUI,

SerializedFrameSettingsUI.SectionLightingSettings)
.Concat(CED.Select(
SerializedFrameSettingsUI.SectionLightingSettings),
CED.Select(
SerializedLightLoopSettingsUI.SectionLightLoopSettings)).ToArray())
SerializedLightLoopSettingsUI.SectionLightLoopSettings))
};
static void Drawer_FieldBackgroundColor(UIState s, SerializedHDCamera p, Editor owner)

6
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Camera/SerializedFrameSettingsUI.cs


true,
CED.Action(Drawer_FieldForwardRenderingOnly),
CED.FadeGroup(
(s, d, o, i) => s.isSectionExpandedUseForwardOnly.faded,
(s, d, o, i) => s.isSectionExpandedUseForwardOnly,
(s, d, o, i) => s.isSectionExpandedUseDepthPrepass.faded,
(s, d, o, i) => s.isSectionExpandedUseDepthPrepass,
(s, d, o, i) => s.isSectionExpandedXRSupported.faded,
(s, d, o, i) => s.isSectionExpandedXRSupported,
false,
CED.FoldoutGroup(
"XR Settings",

5
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Camera/SerializedLightLoopSettingsUI.cs


using UnityEditor.AnimatedValues;
using UnityEngine;
namespace UnityEditor.Experimental.Rendering
{

static void Drawer_SectionLightLoopSettings(SerializedLightLoopSettingsUI s, SerializedLightLoopSettings p, Editor owner)
{
EditorGUILayout.PropertyField(p.enableTileAndCluster, _.GetContent("Enable Tile And Cluster"));
GUILayout.BeginVertical();
if (EditorGUILayout.BeginFadeGroup(s.isSectionExpandedEnableTileAndCluster.faded))
{
EditorGUI.indentLevel++;

EditorGUILayout.PropertyField(p.enableFptlForForwardOpaque, _.GetContent("Enable FPTL For Forward Opaque"));
EditorGUILayout.PropertyField(p.enableComputeLightEvaluation, _.GetContent("Enable Compute Light Evaluation"));
GUILayout.BeginVertical();
if (EditorGUILayout.BeginFadeGroup(s.isSectionExpandedComputeLightEvaluation.faded))
{
EditorGUI.indentLevel++;

}
EditorGUILayout.EndFadeGroup();
GUILayout.EndVertical();
GUILayout.EndVertical();
EditorGUILayout.PropertyField(p.isFptlEnabled, _.GetContent("Enable FPTL"));
EditorGUILayout.PropertyField(p.enableFptlForForwardOpaque, _.GetContent("Enable FPTL For Forward Opaque"));

24
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/HDRenderPipelineInspector.cs


public sealed partial class HDRenderPipelineInspector : HDBaseEditor<HDRenderPipelineAsset>
{
static readonly CED.IDrawer[] k_FrameSettings = new[]
{
SerializedFrameSettingsUI.SectionRenderingPasses,
SerializedFrameSettingsUI.SectionRenderingSettings
}.Concat(CED.Select(
{
SerializedFrameSettingsUI.SectionRenderingPasses,
SerializedFrameSettingsUI.SectionRenderingSettings,
CED.Select(
SerializedLightLoopSettingsUI.SectionLightLoopSettings))
.Concat(new[]
{
SerializedFrameSettingsUI.SectionXRSettings
})
.ToArray();
SerializedLightLoopSettingsUI.SectionLightLoopSettings),
SerializedFrameSettingsUI.SectionXRSettings
};
SerializedProperty m_RenderPipelineResources;

SerializedProperty m_SubsurfaceScatteringSettings;
SerializedFrameSettings serializedFrameSettings = null;
SerializedFrameSettingsUI SerializedFrameSettingsUI = new SerializedFrameSettingsUI();
SerializedFrameSettingsUI serializedFrameSettingsUI = new SerializedFrameSettingsUI();
void InitializeProperties()
{

serializedFrameSettings = new SerializedFrameSettings(properties.Find(x => x.serializedFrameSettings));
SerializedFrameSettingsUI.Reset(serializedFrameSettings, Repaint);
serializedFrameSettingsUI.Reset(serializedFrameSettings, Repaint);
}
static void HackSetDirty(RenderPipelineAsset asset)

CheckStyles();
serializedObject.Update();
serializedFrameSettingsUI.Update();
EditorGUILayout.PropertyField(m_RenderPipelineResources, s_Styles.renderPipelineResources);
EditorGUILayout.Space();

SettingsUI(m_Target);
k_FrameSettings.Draw(SerializedFrameSettingsUI, serializedFrameSettings, this);
k_FrameSettings.Draw(serializedFrameSettingsUI, serializedFrameSettings, this);
serializedObject.ApplyModifiedProperties();
}

8
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/HDReflectionProbeEditor.Data.cs


}
}
public float IsSectionExpandedMode(ReflectionProbeMode mode)
public AnimBool IsSectionExpandedMode(ReflectionProbeMode mode)
return m_IsSectionExpandedModeSettings[(int)mode].faded;
return m_IsSectionExpandedModeSettings[(int)mode];
}
public void SetModeTarget(int value)

}
public float IsSectionExpandedShape(ReflectionInfluenceShape value)
public AnimBool IsSectionExpandedShape(ReflectionInfluenceShape value)
return m_IsSectionExpandedInfluenceShape[(int)value].faded;
return m_IsSectionExpandedInfluenceShape[(int)value];
}
public void SetShapeTarget(int value)

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/HDReflectionProbeEditor.Drawers.cs


);
static readonly CED.IDrawer k_SeparateProjectionVolumeSection = CED.FadeGroup(
(s, p, o, i) => s.isSectionExpandedSeparateProjection.faded,
(s, p, o, i) => s.isSectionExpandedSeparateProjection,
false,
CED.FoldoutGroup(
"Reprojection volume settings",

正在加载...
取消
保存