Frédéric Vauchelles
7 年前
当前提交
43c18028
共有 9 个文件被更改,包括 282 次插入 和 91 次删除
-
47ScriptableRenderPipeline/Core/CoreRP/Editor/CoreEditorDrawers.cs
-
26ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Camera/HDCameraEditor.Data.cs
-
94ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Camera/HDCameraEditor.Drawers.cs
-
104ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Camera/SerializedFrameSettingsUI.cs
-
11ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Camera/SerializedFrameSettingsUI.cs.meta
-
37ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Camera/SerializedLightLoopSettingsUI.cs
-
11ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Camera/SerializedLightLoopSettingsUI.cs.meta
-
32ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Camera/SerializedUIBase.cs
-
11ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Camera/SerializedUIBase.cs.meta
|
|||
using UnityEditor.AnimatedValues; |
|||
using UnityEngine.Events; |
|||
|
|||
namespace UnityEditor.Experimental.Rendering |
|||
{ |
|||
using _ = CoreEditorUtils; |
|||
using CED = CoreEditorDrawer<SerializedFrameSettingsUI, SerializedFrameSettings>; |
|||
|
|||
class SerializedFrameSettingsUI : SerializedUIBase |
|||
{ |
|||
public static CED.IDrawer SectionRenderingPasses = CED.FoldoutGroup( |
|||
"Rendering Passes", |
|||
(s, p, o) => s.isSectionExpandedRenderingPasses, |
|||
true, |
|||
CED.Action(Drawer_SectionRenderingPasses)); |
|||
|
|||
public static CED.IDrawer SectionRenderingSettings = CED.FoldoutGroup( |
|||
"Rendering Settings", |
|||
(s, p, o) => s.isSectionExpandedRenderingSettings, |
|||
true, |
|||
CED.Action(Drawer_SectionRenderingSettings)); |
|||
|
|||
public static CED.IDrawer SectionXRSettings = CED.FadeGroup( |
|||
(s, d, o, i) => s.isSectionExpandedXRSupported.faded, |
|||
false, |
|||
CED.FoldoutGroup( |
|||
"XR Settings", |
|||
(s, p, o) => s.isSectionExpandedXRSettings, |
|||
true, |
|||
CED.Action(Drawer_FieldStereoEnabled))); |
|||
|
|||
public static CED.IDrawer SectionLightingSettings = CED.FoldoutGroup( |
|||
"Lighting Settings", |
|||
(s, p, o) => s.isSectionExpandedLightingSettings, |
|||
true, |
|||
CED.Action(Drawer_SectionLightingSettings)); |
|||
|
|||
public AnimBool isSectionExpandedRenderingPasses { get { return m_AnimBools[0]; } } |
|||
public AnimBool isSectionExpandedLightingSettings { get { return m_AnimBools[1]; } } |
|||
public AnimBool isSectionExpandedRenderingSettings { get { return m_AnimBools[2]; } } |
|||
public AnimBool isSectionExpandedXRSettings { get { return m_AnimBools[3]; } } |
|||
public AnimBool isSectionExpandedXRSupported { get { return m_AnimBools[4]; } } |
|||
|
|||
public SerializedLightLoopSettingsUI serializedLightLoopSettingsUI = new SerializedLightLoopSettingsUI(); |
|||
|
|||
public SerializedFrameSettingsUI() |
|||
: base(5) |
|||
{ |
|||
} |
|||
|
|||
public override void Reset(UnityAction repaint) |
|||
{ |
|||
base.Reset(repaint); |
|||
serializedLightLoopSettingsUI.Reset(repaint); |
|||
} |
|||
|
|||
public override void Update() |
|||
{ |
|||
isSectionExpandedXRSupported.target = PlayerSettings.virtualRealitySupported; |
|||
serializedLightLoopSettingsUI.Update(); |
|||
} |
|||
|
|||
static void Drawer_SectionRenderingPasses(SerializedFrameSettingsUI s, SerializedFrameSettings p, Editor owner) |
|||
{ |
|||
EditorGUILayout.PropertyField(p.enableTransparentPrepass, _.GetContent("Enable Transparent Prepass")); |
|||
EditorGUILayout.PropertyField(p.enableTransparentPostpass, _.GetContent("Enable Transparent Postpass")); |
|||
EditorGUILayout.PropertyField(p.enableMotionVectors, _.GetContent("Enable Motion Vectors")); |
|||
EditorGUILayout.PropertyField(p.enableObjectMotionVectors, _.GetContent("Enable Object Motion Vectors")); |
|||
EditorGUILayout.PropertyField(p.enableDBuffer, _.GetContent("Enable DBuffer")); |
|||
EditorGUILayout.PropertyField(p.enableAtmosphericScattering, _.GetContent("Enable Atmospheric Scattering")); |
|||
EditorGUILayout.PropertyField(p.enableRoughRefraction, _.GetContent("Enable Rough Refraction")); |
|||
EditorGUILayout.PropertyField(p.enableDistortion, _.GetContent("Enable Distortion")); |
|||
EditorGUILayout.PropertyField(p.enablePostprocess, _.GetContent("Enable Postprocess")); |
|||
} |
|||
|
|||
static void Drawer_SectionRenderingSettings(SerializedFrameSettingsUI s, SerializedFrameSettings p, Editor owner) |
|||
{ |
|||
EditorGUILayout.PropertyField(p.enableForwardRenderingOnly, _.GetContent("Enable Forward Rendering Only")); |
|||
EditorGUILayout.PropertyField(p.enableDepthPrepassWithDeferredRendering, _.GetContent("Enable Depth Prepass With Deferred Rendering")); |
|||
EditorGUILayout.PropertyField(p.enableAlphaTestOnlyInDeferredPrepass, _.GetContent("Enable Alpha Test Only In Deferred Prepass")); |
|||
|
|||
EditorGUILayout.PropertyField(p.enableAsyncCompute, _.GetContent("Enable Async Compute")); |
|||
|
|||
EditorGUILayout.PropertyField(p.enableOpaqueObjects, _.GetContent("Enable Opaque Objects")); |
|||
EditorGUILayout.PropertyField(p.enableTransparentObjects, _.GetContent("Enable Transparent Objects")); |
|||
|
|||
EditorGUILayout.PropertyField(p.enableMSAA, _.GetContent("Enable MSAA")); |
|||
} |
|||
|
|||
static void Drawer_FieldStereoEnabled(SerializedFrameSettingsUI s, SerializedFrameSettings p, Editor owner) |
|||
{ |
|||
EditorGUILayout.PropertyField(p.enableStereo, _.GetContent("Enable Stereo")); |
|||
} |
|||
|
|||
static void Drawer_SectionLightingSettings(SerializedFrameSettingsUI s, SerializedFrameSettings p, Editor owner) |
|||
{ |
|||
EditorGUILayout.PropertyField(p.enableSSR, _.GetContent("Enable SSR")); |
|||
EditorGUILayout.PropertyField(p.enableSSAO, _.GetContent("Enable SSAO")); |
|||
EditorGUILayout.PropertyField(p.enableSSSAndTransmission, _.GetContent("Enable SSS And Transmission")); |
|||
EditorGUILayout.PropertyField(p.enableShadow, _.GetContent("Enable Shadow")); |
|||
EditorGUILayout.PropertyField(p.enableShadowMask, _.GetContent("Enable Shadow Masks")); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: e5017bb8546839c4ca4e816932f0245d |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using UnityEditor.AnimatedValues; |
|||
using UnityEngine.Events; |
|||
|
|||
namespace UnityEditor.Experimental.Rendering |
|||
{ |
|||
using _ = CoreEditorUtils; |
|||
using CED = CoreEditorDrawer<SerializedLightLoopSettingsUI, SerializedLightLoopSettings>; |
|||
|
|||
class SerializedLightLoopSettingsUI : SerializedUIBase |
|||
{ |
|||
public static CED.IDrawer SectionLightLoopSettings = CED.FoldoutGroup( |
|||
"Light Loop Settings", |
|||
(s, p, o) => s.isSectionExpandedLightLoopSettings, |
|||
true, |
|||
CED.Action(Drawer_SectionLightLoopSettings)); |
|||
|
|||
public AnimBool isSectionExpandedLightLoopSettings { get { return m_AnimBools[0]; } } |
|||
|
|||
public SerializedLightLoopSettingsUI() |
|||
: base(1) |
|||
{ |
|||
} |
|||
|
|||
static void Drawer_SectionLightLoopSettings(SerializedLightLoopSettingsUI s, SerializedLightLoopSettings p, Editor owner) |
|||
{ |
|||
EditorGUILayout.PropertyField(p.enableTileAndCluster, _.GetContent("Enable Tile And Cluster")); |
|||
EditorGUILayout.PropertyField(p.enableComputeLightEvaluation, _.GetContent("Enable Compute Light Evaluation")); |
|||
EditorGUILayout.PropertyField(p.enableComputeLightVariants, _.GetContent("Enable Compute Light Variants")); |
|||
EditorGUILayout.PropertyField(p.enableComputeMaterialVariants, _.GetContent("Enable Compute Material Variants")); |
|||
|
|||
EditorGUILayout.PropertyField(p.isFptlEnabled, _.GetContent("Enable FPTL")); |
|||
EditorGUILayout.PropertyField(p.enableFptlForForwardOpaque, _.GetContent("Enable FPTL For Forward Opaque")); |
|||
|
|||
EditorGUILayout.PropertyField(p.enableBigTilePrepass, _.GetContent("Enable Big Tile Prepass")); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 035f43bd7b3c01b4dbd3d7e33382ec8e |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using UnityEditor.AnimatedValues; |
|||
using UnityEngine.Events; |
|||
|
|||
namespace UnityEditor.Experimental.Rendering |
|||
{ |
|||
class SerializedUIBase |
|||
{ |
|||
protected AnimBool[] m_AnimBools = null; |
|||
|
|||
public SerializedUIBase(int animBoolCount) |
|||
{ |
|||
m_AnimBools = new AnimBool[animBoolCount]; |
|||
for (var i = 0; i < m_AnimBools.Length; ++i) |
|||
m_AnimBools[i] = new AnimBool(); |
|||
} |
|||
|
|||
public virtual void Reset(UnityAction repaint) |
|||
{ |
|||
for (var i = 0; i < m_AnimBools.Length; ++i) |
|||
{ |
|||
m_AnimBools[i].valueChanged.RemoveAllListeners(); |
|||
m_AnimBools[i].valueChanged.AddListener(repaint); |
|||
} |
|||
|
|||
Update(); |
|||
} |
|||
|
|||
public virtual void Update() |
|||
{ |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 552d470a524dbaa44bd6833071913719 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue