浏览代码

First draft

/Lux-for-HDRI
Sebastien Lagarde 6 年前
当前提交
c9aa61bd
共有 2 个文件被更改,包括 28 次插入3 次删除
  1. 20
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Sky/HDRISky/HDRISkyEditor.cs
  2. 11
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Sky/HDRISky/HDRISky.cs

20
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Sky/HDRISky/HDRISkyEditor.cs


public class HDRISkyEditor
: SkySettingsEditor
{
SerializedDataParameter m_hdriSky;
SerializedDataParameter m_HdriSky;
SerializedDataParameter m_Intensity;
SerializedDataParameter m_EnableIntensity;
public override void OnEnable()
{

m_hdriSky = Unpack(o.Find(x => x.hdriSky));
m_HdriSky = Unpack(o.Find(x => x.hdriSky));
m_Intensity = Unpack(o.Find(x => x.intensity));
m_EnableIntensity = Unpack(o.Find(x => x.enableIntensity));
PropertyField(m_hdriSky);
EditorGUI.BeginChangeCheck();
PropertyField(m_HdriSky);
PropertyField(m_EnableIntensity);
using (new UnityEditor.EditorGUI.DisabledScope(m_EnableIntensity.value.boolValue))
{
PropertyField(m_Intensity);
}
if (EditorGUI.EndChangeCheck())
{
// target. NeedComputeMultiplier();
}
EditorGUILayout.Space();

11
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Sky/HDRISky/HDRISky.cs


{
[Tooltip("Cubemap used to render the sky.")]
public CubemapParameter hdriSky = new CubemapParameter(null);
[Tooltip("Desired intensity in Lux for the upper hemisphere of the HDRI")]
public float intensity = 10000;
[Tooltip("If enabled the HDRI will be calibrated based on the desired intensity provided")]
public bool enableIntensity = false;
public bool NeedComputeMultiplier()
{
return m_needComputeMultiplier;
}
bool m_needComputeMultiplier = false;
public override SkyRenderer CreateRenderer()
{

正在加载...
取消
保存