浏览代码

merge proxyVolume field in HDProbe

/main
RSlysz 6 年前
当前提交
62d196e1
共有 7 个文件被更改,包括 27 次插入28 次删除
  1. 8
      com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/PlanarReflectionProbeUI.Handles.cs
  2. 2
      com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/SerializedHDReflectionProbe.cs
  3. 6
      com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/SerializedPlanarReflectionProbe.cs
  4. 2
      com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/HDAdditionalReflectionData.cs
  5. 4
      com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/HDProbe.cs
  6. 17
      com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/PlanarReflectionProbe.cs
  7. 16
      com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/ProbeWrapper.cs

8
com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/PlanarReflectionProbeUI.Handles.cs


Handles.matrix = m;
}
if (d.proxyVolumeReference != null)
ReflectionProxyVolumeComponentUI.DrawHandles_EditNone(s.reflectionProxyVolume, d.proxyVolumeReference);
if (d.proxyVolume != null)
ReflectionProxyVolumeComponentUI.DrawHandles_EditNone(s.reflectionProxyVolume, d.proxyVolume);
}
[DrawGizmo(GizmoType.Selected)]

}
}
if (d.proxyVolumeReference != null)
ReflectionProxyVolumeComponentUI.DrawGizmos_EditNone(s.reflectionProxyVolume, d.proxyVolumeReference);
if (d.proxyVolume != null)
ReflectionProxyVolumeComponentUI.DrawGizmos_EditNone(s.reflectionProxyVolume, d.proxyVolume);
var showFrustrum = s.showCaptureHandles
|| EditMode.editMode == EditCenter;

2
com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/SerializedHDReflectionProbe.cs


Apply();
}
proxyVolumeComponent = addso.Find((HDAdditionalReflectionData d) => d.proxyVolumeComponent);
proxyVolumeComponent = addso.Find((HDAdditionalReflectionData d) => d.proxyVolume);
}
public void Update()

6
com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/SerializedPlanarReflectionProbe.cs


{
this.serializedObject = serializedObject;
proxyVolumeReference = serializedObject.Find((PlanarReflectionProbe p) => p.proxyVolumeReference);
proxyVolumeReference = serializedObject.Find((PlanarReflectionProbe p) => p.proxyVolume);
influenceVolume = new SerializedInfluenceVolume(serializedObject.Find((PlanarReflectionProbe p) => p.influenceVolume));
captureLocalPosition = serializedObject.Find((PlanarReflectionProbe p) => p.captureLocalPosition);

var objs = new List<Object>();
for (var i = 0; i < serializedObject.targetObjects.Length; i++)
{
var p = ((PlanarReflectionProbe)serializedObject.targetObjects[i]).proxyVolumeReference;
var p = ((PlanarReflectionProbe)serializedObject.targetObjects[i]).proxyVolume;
if (p != null)
objs.Add(p);
}

var proxyVolumeTargets = reflectionProxyVolume.serializedObject.targetObjects;
for (var i = 0; i < serializedObject.targetObjects.Length; i++)
{
if (proxyVolumeTargets[i] != ((PlanarReflectionProbe)serializedObject.targetObjects[i]).proxyVolumeReference)
if (proxyVolumeTargets[i] != ((PlanarReflectionProbe)serializedObject.targetObjects[i]).proxyVolume)
{
updateProxyVolume = true;
break;

2
com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/HDAdditionalReflectionData.cs


[SerializeField] private float editorSimplifiedModeBlendNormalDistance;
[SerializeField] private bool editorAdvancedModeEnabled;
public ReflectionProxyVolumeComponent proxyVolumeComponent;
public Vector3 boxBlendCenterOffset { get { return (blendDistanceNegative - blendDistancePositive) * 0.5f; } }
public Vector3 boxBlendSizeOffset { get { return -(blendDistancePositive + blendDistanceNegative); } }
public Vector3 boxBlendNormalCenterOffset { get { return (blendNormalDistanceNegative - blendNormalDistancePositive) * 0.5f; } }

4
com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/HDProbe.cs


using UnityEngine;
using UnityEngine.Serialization;
[SerializeField, FormerlySerializedAs("proxyVolumeComponent"), FormerlySerializedAs("m_ProxyVolumeReference")]
ReflectionProxyVolumeComponent m_ProxyVolume = null;
public ReflectionProxyVolumeComponent proxyVolume { get { return m_ProxyVolume; } }
}
}

17
com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/PlanarReflectionProbe.cs


}
[SerializeField]
ReflectionProxyVolumeComponent m_ProxyVolumeReference = null;
[SerializeField]
InfluenceVolume m_InfluenceVolume = new InfluenceVolume();
[SerializeField]
Vector3 m_CaptureLocalPosition;

public bool overrideFieldOfView { get { return m_OverrideFieldOfView; } }
public float fieldOfViewOverride { get { return m_FieldOfViewOverride; } }
public ReflectionProxyVolumeComponent proxyVolumeReference { get { return m_ProxyVolumeReference; } }
public InfluenceVolume influenceVolume { get { return m_InfluenceVolume; } }
public BoundingSphere boundingSphere { get { return m_InfluenceVolume.GetBoundingSphereAt(transform); } }

{
get
{
return m_ProxyVolumeReference != null
? m_ProxyVolumeReference.transform.localToWorldMatrix
return proxyVolume != null
? proxyVolume.transform.localToWorldMatrix
: influenceToWorld;
}
}

{
return m_ProxyVolumeReference != null
? m_ProxyVolumeReference.proxyVolume.shapeType
return proxyVolume != null
? proxyVolume.proxyVolume.shapeType
: influenceVolume.shapeType;
}
}

{
return m_ProxyVolumeReference != null
? m_ProxyVolumeReference.proxyVolume.extents
return proxyVolume != null
? proxyVolume.proxyVolume.extents
public bool infiniteProjection { get { return m_ProxyVolumeReference != null && m_ProxyVolumeReference.proxyVolume.infiniteProjection; } }
public bool infiniteProjection { get { return proxyVolume != null && proxyVolume.proxyVolume.infiniteProjection; } }
public bool useMirrorPlane
{

16
com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/ProbeWrapper.cs


{
get
{
return additional.proxyVolumeComponent != null
? ConvertShape(additional.proxyVolumeComponent.proxyVolume.shapeType)
return additional.proxyVolume != null
? ConvertShape(additional.proxyVolume.proxyVolume.shapeType)
: influenceShapeType;
}
}

{
return additional.proxyVolumeComponent != null
? additional.proxyVolumeComponent.proxyVolume.extents
return additional.proxyVolume != null
? additional.proxyVolume.proxyVolume.extents
: influenceExtents;
}
}

get
{
return additional.proxyVolumeComponent != null
? additional.proxyVolumeComponent.proxyVolume.infiniteProjection
return additional.proxyVolume != null
? additional.proxyVolume.proxyVolume.infiniteProjection
: probe.boxProjection == 0;
}
}

get
{
return additional.proxyVolumeComponent != null
? additional.proxyVolumeComponent.transform.localToWorldMatrix
return additional.proxyVolume != null
? additional.proxyVolume.transform.localToWorldMatrix
: influenceToWorld;
}
}

正在加载...
取消
保存