浏览代码

Added capture settings section

/feature-ReflectionProbeFit
Frédéric Vauchelles 7 年前
当前提交
feb9a7a0
共有 3 个文件被更改,包括 68 次插入33 次删除
  1. 20
      ScriptableRenderPipeline/HDRenderPipeline/Editor/Lighting/HDReflectionProbeEditor.Data.cs
  2. 80
      ScriptableRenderPipeline/HDRenderPipeline/Editor/Lighting/HDReflectionProbeEditor.Drawers.cs
  3. 1
      ScriptableRenderPipeline/HDRenderPipeline/Editor/Lighting/HDReflectionProbeEditor.cs

20
ScriptableRenderPipeline/HDRenderPipeline/Editor/Lighting/HDReflectionProbeEditor.Data.cs


internal SerializedProperty mode;
internal SerializedProperty renderDynamicObjects;
internal SerializedProperty customBakedTexture;
internal SerializedProperty customBakedTexture;
internal SerializedProperty refreshMode;
internal SerializedProperty timeSlicingMode;
internal SerializedProperty intensityMultiplier;

internal SerializedProperty resolution;
internal SerializedProperty shadowDistance;
internal SerializedProperty cullingMask;
internal SerializedProperty useOcclusionCulling;
internal SerializedProperty nearClip;
internal SerializedProperty farClip;
internal SerializedProperty influenceShape;
internal SerializedProperty influenceSphereRadius;
internal SerializedProperty useSeparateProjectionVolume;

this.so = so;
mode = so.FindProperty("m_Mode");
customBakedTexture = so.FindProperty("m_CustomBakedTexture");
customBakedTexture = so.FindProperty("m_CustomBakedTexture");
intensityMultiplier = so.FindProperty("m_IntensityMultiplier");
intensityMultiplier = so.FindProperty("m_IntensityMultiplier");
resolution = so.FindProperty("m_Resolution");
shadowDistance = so.FindProperty("m_ShadowDistance");
cullingMask = so.FindProperty("m_CullingMask");
useOcclusionCulling = so.FindProperty("m_UseOcclusionCulling");
nearClip = so.FindProperty("m_NearClip");
farClip = so.FindProperty("m_FarClip");
influenceShape = addso.Find((HDAdditionalReflectionData d) => d.m_InfluenceShape);
influenceSphereRadius = addso.Find((HDAdditionalReflectionData d) => d.m_InfluenceSphereRadius);

80
ScriptableRenderPipeline/HDRenderPipeline/Editor/Lighting/HDReflectionProbeEditor.Drawers.cs


using UnityEditorInternal;
using UnityEngine;
using UnityEngine.Experimental.Rendering;
using UnityEngine.Experimental.Rendering.HDPipeline;
using UnityEngine.Rendering;
namespace UnityEditor.Experimental.Rendering

partial class HDReflectionProbeEditor
{
static void Drawer_NOOP(UIState s, SerializedReflectionProbe p, Editor owner) { }
static void Drawer_Space(UIState s, SerializedReflectionProbe p, Editor owner) { EditorGUILayout.Space(); }
static readonly CED.IDrawer[] k_PrimarySection =
{
CED.Action(Drawer_ReflectionProbeMode),
CED.FadeGroup((s, p, o, i) => s.GetModeFaded((ReflectionProbeMode)i),
true,
CED.noop, // Baked
CED.Action(Drawer_ModeSettingsRealtime), // Realtime
CED.Action(Drawer_ModeSettingsCustom) // Custom
),
CED.space,
CED.Action(Drawer_InfluenceShape),
CED.Action(Drawer_IntensityMultiplier),
CED.space,
CED.Action(Drawer_Toolbar),
CED.space
};
static readonly CED.IDrawer k_InfluenceVolumeSection = CED.FoldoutGroup(
"Influence volume settings",
(s, p, o) => p.blendDistance,

)
);
static readonly CED.IDrawer[] k_PrimarySection =
{
CED.Action(Drawer_ReflectionProbeMode),
CED.FadeGroup((s, p, o, i) => s.GetModeFaded((ReflectionProbeMode)i),
true,
CED.noop, // Baked
CED.Action(Drawer_ModeSettingsRealtime), // Realtime
CED.Action(Drawer_ModeSettingsCustom) // Custom
),
CED.space,
CED.Action(Drawer_InfluenceShape),
CED.Action(Drawer_IntensityMultiplier),
CED.space,
CED.Action(Drawer_Toolbar),
CED.space
};
static readonly CED.IDrawer k_CaptureSection = CED.FoldoutGroup(
"Capture settings",
(s, p, o) => p.shadowDistance,
true,
CED.Action(Drawer_CaptureSettings)
);
static void Drawer_CaptureSettings(UIState s, SerializedReflectionProbe p, Editor owner)
{
var renderPipelineAsset = (HDRenderPipelineAsset)GraphicsSettings.renderPipelineAsset;
p.resolution.intValue = renderPipelineAsset.globalTextureSettings.reflectionCubemapSize;
EditorGUILayout.LabelField(CoreEditorUtils.GetContent("Resolution"), CoreEditorUtils.GetContent(p.resolution.intValue.ToString()));
EditorGUILayout.PropertyField(p.shadowDistance);
EditorGUILayout.PropertyField(p.cullingMask);
EditorGUILayout.PropertyField(p.useOcclusionCulling);
EditorGUILayout.PropertyField(p.nearClip);
EditorGUILayout.PropertyField(p.farClip);
}
#region Influence Volume
static void Drawer_InfluenceBoxSettings(UIState s, SerializedReflectionProbe p, Editor owner)
{
EditorGUI.BeginChangeCheck();

}
}
static void Drawer_ProjectionBoxSettings(UIState s, SerializedReflectionProbe p, Editor owner)
static void Drawer_InfluenceSphereSettings(UIState s, SerializedReflectionProbe p, Editor owner)
EditorGUILayout.PropertyField(p.boxReprojectionVolumeSize);
EditorGUILayout.PropertyField(p.boxReprojectionVolumeCenter);
EditorGUILayout.PropertyField(p.influenceSphereRadius, CoreEditorUtils.GetContent("Radius"));
#endregion
static void Drawer_ProjectionSphereSettings(UIState s, SerializedReflectionProbe p, Editor owner)
#region Projection Volume
static void Drawer_UseSeparateProjectionVolume(UIState s, SerializedReflectionProbe p, Editor owner)
EditorGUILayout.PropertyField(p.sphereReprojectionVolumeRadius);
EditorGUILayout.PropertyField(p.useSeparateProjectionVolume);
s.useSeparateProjectionVolumeDisplay.target = p.useSeparateProjectionVolume.boolValue;
static void Drawer_InfluenceSphereSettings(UIState s, SerializedReflectionProbe p, Editor owner)
static void Drawer_ProjectionBoxSettings(UIState s, SerializedReflectionProbe p, Editor owner)
EditorGUILayout.PropertyField(p.influenceSphereRadius, CoreEditorUtils.GetContent("Radius"));
EditorGUILayout.PropertyField(p.boxReprojectionVolumeSize);
EditorGUILayout.PropertyField(p.boxReprojectionVolumeCenter);
static void Drawer_UseSeparateProjectionVolume(UIState s, SerializedReflectionProbe p, Editor owner)
static void Drawer_ProjectionSphereSettings(UIState s, SerializedReflectionProbe p, Editor owner)
EditorGUILayout.PropertyField(p.useSeparateProjectionVolume);
s.useSeparateProjectionVolumeDisplay.target = p.useSeparateProjectionVolume.boolValue;
EditorGUILayout.PropertyField(p.sphereReprojectionVolumeRadius);
#endregion
#region Field Drawers
static readonly GUIContent[] k_Content_ReflectionProbeMode = { new GUIContent("Baked"), new GUIContent("Custom"), new GUIContent("Realtime") };

1
ScriptableRenderPipeline/HDRenderPipeline/Editor/Lighting/HDReflectionProbeEditor.cs


k_PrimarySection.Draw(s, p, this);
k_InfluenceVolumeSection.Draw(s, p, this);
k_SeparateProjectionVolumeSection.Draw(s, p, this);
k_CaptureSection.Draw(s, p, this);
PerformOperations(s, p, this);

正在加载...
取消
保存