浏览代码

Merge pull request #1815 from Unity-Technologies/HDRP/fix/reflectionprobe-gizmo-scale-independent

Hdrp/fix/reflectionprobe gizmo scale independent
/main
GitHub 7 年前
当前提交
18699c8f
共有 8 个文件被更改,包括 17 次插入11 次删除
  1. 4
      com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDReflectionProbeEditor.Gizmos.cs
  2. 2
      com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDReflectionProbeEditor.Handles.cs
  3. 3
      com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDReflectionProbeEditor.cs
  4. 3
      com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/PlanarReflectionProbeEditor.cs
  5. 4
      com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/PlanarReflectionProbeUI.Handles.cs
  6. 8
      com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/Volume/ProxyVolumeUI.cs
  7. 2
      com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/PlanarReflectionProbe.cs
  8. 2
      com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/ProbeWrapper.cs

4
com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDReflectionProbeEditor.Gizmos.cs


return;
var reflectionData = reflectionProbe.GetComponent<HDAdditionalReflectionData>();
var mat = reflectionProbe.transform.localToWorldMatrix;
var mat = Matrix4x4.TRS(reflectionProbe.transform.position, reflectionProbe.transform.rotation, Vector3.one);
switch (EditMode.editMode)
{

var reflectionData = reflectionProbe.GetComponent<HDAdditionalReflectionData>();
Gizmos_CapturePoint(reflectionProbe, reflectionData, e);
var mat = reflectionProbe.transform.localToWorldMatrix;
var mat = Matrix4x4.TRS(reflectionProbe.transform.position, reflectionProbe.transform.rotation, Vector3.one);
InfluenceVolumeUI.DrawGizmos(e.m_UIState.influenceVolume, reflectionData.influenceVolume, mat, InfluenceVolumeUI.HandleType.None, InfluenceVolumeUI.HandleType.Base);
if (!e.sceneViewEditing)

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


if (!s.sceneViewEditing)
return;
var mat = p.target.transform.localToWorldMatrix;
var mat = Matrix4x4.TRS(p.target.transform.position, p.target.transform.rotation, Vector3.one);
EditorGUI.BeginChangeCheck();

3
com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDReflectionProbeEditor.cs


}
InitializeAllTargetProbes();
HDAdditionalReflectionData probe = (HDAdditionalReflectionData)m_AdditionalDataSerializedObject.targetObject;
probe.influenceVolume.Init(probe);
}

3
com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/PlanarReflectionProbeEditor.cs


s_StateMap[m_TypedTargets[i]] = m_UIHandleState[i];
}
PlanarReflectionProbe probe = (PlanarReflectionProbe)target;
probe.influenceVolume.Init(probe);
}
void OnDisable()

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


public static void DrawHandles(PlanarReflectionProbeUI s, PlanarReflectionProbe d, Editor o)
{
var mat = d.transform.localToWorldMatrix;
var mat = Matrix4x4.TRS(d.transform.position, d.transform.rotation, Vector3.one);
switch (EditMode.editMode)
{

if (!PlanarReflectionProbeEditor.TryGetUIStateFor(d, out s))
return;
var mat = d.transform.localToWorldMatrix;
var mat = Matrix4x4.TRS(d.transform.position, d.transform.rotation, Vector3.one);
switch (EditMode.editMode)
{

8
com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/Volume/ProxyVolumeUI.cs


s.sphereProjectionHandle.radius = proxyVolume.sphereRadius;
var mat = Handles.matrix;
Handles.matrix = transform.localToWorldMatrix;
Handles.matrix = Matrix4x4.TRS(transform.position, transform.rotation, Vector3.one);
Handles.color = k_GizmoThemeColorProjection;
EditorGUI.BeginChangeCheck();
s.sphereProjectionHandle.DrawHandle();

s.boxProjectionHandle.size = proxyVolume.boxSize;
var mat = Handles.matrix;
Handles.matrix = transform.localToWorldMatrix;
Handles.matrix = Matrix4x4.TRS(transform.position, transform.rotation, Vector3.one);
Handles.color = k_GizmoThemeColorProjection;
EditorGUI.BeginChangeCheck();

static void Gizmos_EditNone_Sphere(Transform t, ProxyVolume d, ProxyVolumeUI s, Object o)
{
var mat = Gizmos.matrix;
Gizmos.matrix = t.localToWorldMatrix;
Gizmos.matrix = Matrix4x4.TRS(t.position, t.rotation, Vector3.one);
Gizmos.color = k_GizmoThemeColorProjection;
Gizmos.DrawWireSphere(Vector3.zero, d.sphereRadius);

static void Gizmos_EditNone_Box(Transform t, ProxyVolume d, ProxyVolumeUI s, Object o)
{
var mat = Gizmos.matrix;
Gizmos.matrix = t.localToWorldMatrix;
Gizmos.matrix = Matrix4x4.TRS(t.position, t.rotation, Vector3.one);
Gizmos.color = k_GizmoThemeColorProjection;
Gizmos.DrawWireCube(Vector3.zero, d.boxSize);

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


get
{
return proxyVolume != null
? proxyVolume.transform.localToWorldMatrix
? Matrix4x4.TRS(proxyVolume.transform.position, proxyVolume.transform.rotation, Vector3.one)
: influenceToWorld;
}
}

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


get
{
return additional.proxyVolume != null
? additional.proxyVolume.transform.localToWorldMatrix
? Matrix4x4.TRS(additional.proxyVolume.transform.position, additional.proxyVolume.transform.rotation, Vector3.one)
: influenceToWorld;
}
}

正在加载...
取消
保存