浏览代码

Updated additional settings

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

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


internal SerializedProperty farClip;
internal SerializedProperty influenceShape;
internal SerializedProperty influenceSphereRadius;
internal SerializedProperty influenceSphereRadius;
internal SerializedProperty dimmer;
public SerializedReflectionProbe(SerializedObject so, SerializedObject addso)
{

boxReprojectionVolumeSize = addso.Find((HDAdditionalReflectionData d) => d.m_BoxReprojectionVolumeSize);
boxReprojectionVolumeCenter = addso.Find((HDAdditionalReflectionData d) => d.m_BoxReprojectionVolumeCenter);
sphereReprojectionVolumeRadius = addso.Find((HDAdditionalReflectionData d) => d.m_SphereReprojectionVolumeRadius);
dimmer = addso.Find((HDAdditionalReflectionData d) => d.m_Dimmer);
}
}

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


true,
CED.Action(Drawer_CaptureSettings)
);
static readonly CED.IDrawer k_AdditionalSection = CED.FoldoutGroup(
"Additional settings",
(s, p, o) => p.dimmer,
true,
CED.Action(Drawer_AdditionalSettings)
);
#endregion
static void Drawer_CaptureSettings(UIState s, SerializedReflectionProbe p, Editor owner)

EditorGUILayout.PropertyField(p.useOcclusionCulling);
EditorGUILayout.PropertyField(p.nearClip);
EditorGUILayout.PropertyField(p.farClip);
}
static void Drawer_AdditionalSettings(UIState s, SerializedReflectionProbe p, Editor owner)
{
EditorGUILayout.PropertyField(p.dimmer);
if (p.so.targetObjects.Length == 1)
{
var probe = (ReflectionProbe)p.so.targetObject;
if (probe.mode == ReflectionProbeMode.Custom && probe.customBakedTexture != null)
{
var cubemap = probe.customBakedTexture as Cubemap;
if (cubemap && cubemap.mipmapCount == 1)
EditorGUILayout.HelpBox("No mipmaps in the cubemap, Smoothness value in Standard shader will be ignored.", MessageType.Warning);
}
}
}
#region Influence Volume

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


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

正在加载...
取消
保存