浏览代码
Merge pull request #1771 from Unity-Technologies/HDRP/refactor-reflectionProbe/clean-proxy-volume
Merge pull request #1771 from Unity-Technologies/HDRP/refactor-reflectionProbe/clean-proxy-volume
Hdrp/refactor reflection probe/clean proxy volume/main
GitHub
6 年前
当前提交
f1d3b9dd
共有 21 个文件被更改,包括 1234 次插入 和 123 次删除
-
6com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDReflectionProbeEditor.cs
-
12com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDReflectionProbeUI.Drawers.cs
-
4com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDReflectionProbeUI.cs
-
4com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/PlanarReflectionProbeUI.Drawers.cs
-
4com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/Volume/InfluenceVolumeUI.Drawers.cs
-
8com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/Volume/InfluenceVolumeUI.Gizmos.cs
-
12com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/Volume/InfluenceVolumeUI.Handles.cs
-
8com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/Volume/InfluenceVolumeUI.cs
-
38com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/Volume/ProxyVolumeUI.cs
-
12com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/Volume/SerializedProxyVolume.cs
-
4com.unity.render-pipelines.high-definition/HDRP/Lighting/LightLoop/LightLoop.cs
-
4com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/HDAdditionalReflectionData.cs
-
7com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/HDProbe.cs
-
15com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/PlanarReflectionProbe.cs
-
35com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/ProbeWrapper.cs
-
25com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/Volumes/InfluenceVolume.cs
-
42com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/Volumes/ProxyVolume.cs
-
32com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/Volumes/ReflectionProxyVolumeComponent.cs
-
9com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/Volumes/ShapeType.cs
-
1001com.unity.render-pipelines.high-definition/HDRP/Lighting/LightLoop/LightLoop.cs.orig
-
75com.unity.render-pipelines.high-definition/HDRP/Lighting/Reflection/HDProbe.cs.orig
|
|||
namespace UnityEngine.Experimental.Rendering.HDPipeline |
|||
{ |
|||
public class ReflectionProxyVolumeComponent : MonoBehaviour |
|||
public class ReflectionProxyVolumeComponent : MonoBehaviour, ISerializationCallbackReceiver |
|||
enum Version |
|||
{ |
|||
First, |
|||
IncludeInfiniteInShape, |
|||
// Add new version here and they will automatically be the Current one
|
|||
Max, |
|||
Current = Max - 1 |
|||
} |
|||
|
|||
[SerializeField] |
|||
int m_Version; |
|||
|
|||
/// <summary>Access to proxy volume parameters</summary>
|
|||
|
|||
void ISerializationCallbackReceiver.OnBeforeSerialize() |
|||
{ |
|||
} |
|||
|
|||
void ISerializationCallbackReceiver.OnAfterDeserialize() |
|||
{ |
|||
if (m_Version != (int)Version.Current) |
|||
{ |
|||
// Add here data migration code
|
|||
if (m_Version < (int)Version.IncludeInfiniteInShape) |
|||
{ |
|||
proxyVolume.MigrateInfiniteProhjectionInShape(); |
|||
} |
|||
m_Version = (int)Version.Current; |
|||
} |
|||
} |
|||
} |
|||
} |
|
|||
namespace UnityEngine.Experimental.Rendering.HDPipeline |
|||
{ |
|||
public enum Shape |
|||
public enum InfluenceShape |
|||
{ |
|||
Box, |
|||
Sphere, |
|||
} |
|||
|
|||
public enum ProxyShape |
|||
Infinite |
|||
} |
|||
} |
1001
com.unity.render-pipelines.high-definition/HDRP/Lighting/LightLoop/LightLoop.cs.orig
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
using UnityEngine.Rendering; |
|||
using UnityEngine.Serialization; |
|||
|
|||
namespace UnityEngine.Experimental.Rendering.HDPipeline |
|||
{ |
|||
[ExecuteInEditMode] |
|||
public abstract class HDProbe : MonoBehaviour, ISerializationCallbackReceiver |
|||
{ |
|||
[SerializeField, FormerlySerializedAs("proxyVolumeComponent"), FormerlySerializedAs("m_ProxyVolumeReference")] |
|||
ReflectionProxyVolumeComponent m_ProxyVolume = null; |
|||
|
|||
[SerializeField] |
|||
InfluenceVolume m_InfluenceVolume; |
|||
|
|||
[SerializeField, FormerlySerializedAsAttribute("dimmer"), FormerlySerializedAsAttribute("m_Dimmer"), FormerlySerializedAsAttribute("multiplier")] |
|||
float m_Multiplier = 1.0f; |
|||
[SerializeField, FormerlySerializedAsAttribute("weight")] |
|||
[Range(0.0f, 1.0f)] |
|||
float m_Weight = 1.0f; |
|||
|
|||
[SerializeField] |
|||
ReflectionProbeMode m_Mode = ReflectionProbeMode.Baked; |
|||
[SerializeField] |
|||
ReflectionProbeRefreshMode m_RefreshMode = ReflectionProbeRefreshMode.OnAwake; |
|||
|
|||
/// <summary>ProxyVolume currently used by this probe.</summary> |
|||
public ReflectionProxyVolumeComponent proxyVolume { get { return m_ProxyVolume; } } |
|||
|
|||
/// <summary>InfluenceVolume of the probe.</summary> |
|||
public InfluenceVolume influenceVolume { get { return m_InfluenceVolume; } private set { m_InfluenceVolume = value; } } |
|||
|
|||
/// <summary>Multiplier factor of reflection (non PBR parameter).</summary> |
|||
public float multiplier { get { return m_Multiplier; } } |
|||
|
|||
/// <summary>Weight for blending amongst probes (non PBR parameter).</summary> |
|||
public float weight { get { return m_Weight; } } |
|||
|
|||
/// <summary>The capture mode.</summary> |
|||
public virtual ReflectionProbeMode mode |
|||
{ |
|||
get { return m_Mode; } |
|||
set { m_Mode = value; } |
|||
} |
|||
|
|||
/// <summary>Refreshing rate of the capture for Realtime capture mode.</summary> |
|||
public virtual ReflectionProbeRefreshMode refreshMode |
|||
{ |
|||
get { return m_RefreshMode; } |
|||
set { m_RefreshMode = value; } |
|||
} |
|||
<<<<<<< HEAD |
|||
|
|||
void Awake() |
|||
======= |
|||
|
|||
internal void Awake() |
|||
>>>>>>> HDRP/staging |
|||
{ |
|||
if (influenceVolume == null) |
|||
influenceVolume = new InfluenceVolume(); |
|||
influenceVolume.Init(this); |
|||
} |
|||
|
|||
void ISerializationCallbackReceiver.OnBeforeSerialize() |
|||
{ |
|||
} |
|||
|
|||
void ISerializationCallbackReceiver.OnAfterDeserialize() |
|||
{ |
|||
influenceVolume.Init(this); |
|||
} |
|||
|
|||
internal virtual void UpdatedInfluenceVolumeShape(Vector3 size, Vector3 offset) { } |
|||
} |
|||
} |
撰写
预览
正在加载...
取消
保存
Reference in new issue