当前提交
467308e8
共有 26 个文件被更改,包括 529 次插入 和 74 次删除
-
135SampleScenes/HDTest/PlanarReflectionTests.unity
-
8ScriptableRenderPipeline/Core/CoreRP/Editor/CoreEditorUtils.cs
-
8ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Volume.meta
-
7ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/PlanarReflectionProbe.cs
-
11ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/PlanarReflectionProbe.cs.meta
-
8ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumes.meta
-
42ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Volume/ProjectionVolumeComponentUI.cs
-
11ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Volume/ProjectionVolumeComponentUI.cs.meta
-
47ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Volume/ProjectionVolumeEditor.cs
-
11ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Volume/ProjectionVolumeEditor.cs.meta
-
75ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Volume/ProjectionVolumeUI.cs
-
11ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Volume/ProjectionVolumeUI.cs.meta
-
30ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Volume/SerializedProjectionVolume.cs
-
11ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Volume/SerializedProjectionVolume.cs.meta
-
28ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Volume/SerializedProjectionVolumeComponent.cs
-
11ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Volume/SerializedProjectionVolumeComponent.cs.meta
-
49ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumes/InfluenceVolume.cs
-
11ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumes/InfluenceVolume.cs.meta
-
38ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumes/ProjectionVolume.cs
-
11ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumes/ProjectionVolume.cs.meta
-
10ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumes/ProjectionVolumeComponent.cs
-
11ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumes/ProjectionVolumeComponent.cs.meta
-
8ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumes/ShapeType.cs
-
11ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumes/ShapeType.cs.meta
|
|||
fileFormatVersion: 2 |
|||
guid: 9fa44d86e3857954a9a2b40a5cf10bd4 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
namespace UnityEngine.Experimental.Rendering |
|||
{ |
|||
class PlanarReflectionProbe |
|||
{ |
|||
|
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: a4ee7c3a3b205a14a94094d01ff91d6b |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 19d2fc993bedec24d99f5a3af8752c39 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using UnityEditor.Experimental.UIElements; |
|||
using UnityEngine.Events; |
|||
|
|||
namespace UnityEditor.Experimental.Rendering.HDPipeline |
|||
{ |
|||
using _ = CoreEditorUtils; |
|||
using CED = CoreEditorDrawer<ProjectionVolumeComponentUI, SerializedProjectionVolumeComponent>; |
|||
|
|||
class ProjectionVolumeComponentUI : BaseUI<SerializedProjectionVolumeComponent> |
|||
{ |
|||
public static readonly CED.IDrawer Inspector; |
|||
|
|||
static ProjectionVolumeComponentUI() |
|||
{ |
|||
Inspector = CED.Select( |
|||
(s, d, o) => s.projectionVolume, |
|||
(s, d, o) => d.projectionVolume, |
|||
ProjectionVolumeUI.SectionShape |
|||
); |
|||
} |
|||
|
|||
public ProjectionVolumeUI projectionVolume = new ProjectionVolumeUI(); |
|||
|
|||
public ProjectionVolumeComponentUI() |
|||
: base(0) |
|||
{ |
|||
|
|||
} |
|||
|
|||
public override void Reset(SerializedProjectionVolumeComponent data, UnityAction repaint) |
|||
{ |
|||
projectionVolume.Reset(data.projectionVolume, repaint); |
|||
base.Reset(data, repaint); |
|||
} |
|||
|
|||
public override void Update() |
|||
{ |
|||
projectionVolume.Update(); |
|||
base.Update(); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 4db48f42cf8b74e4b973195bf39276a0 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System.Linq; |
|||
using UnityEngine.Experimental.Rendering.HDPipeline; |
|||
|
|||
namespace UnityEditor.Experimental.Rendering.HDPipeline |
|||
{ |
|||
[CustomEditor(typeof(ProjectionVolumeComponent))] |
|||
[CanEditMultipleObjects] |
|||
class ProjectionVolumeEditor : Editor |
|||
{ |
|||
ProjectionVolumeComponent[] m_TypedTargets; |
|||
SerializedProjectionVolumeComponent m_SerializedData; |
|||
ProjectionVolumeComponentUI m_UIState = new ProjectionVolumeComponentUI(); |
|||
|
|||
void OnEnable() |
|||
{ |
|||
m_TypedTargets = targets.Cast<ProjectionVolumeComponent>().ToArray(); |
|||
m_SerializedData = new SerializedProjectionVolumeComponent(serializedObject); |
|||
|
|||
m_UIState.Reset(m_SerializedData, Repaint); |
|||
} |
|||
|
|||
public override void OnInspectorGUI() |
|||
{ |
|||
var s = m_UIState; |
|||
var d = m_SerializedData; |
|||
var o = this; |
|||
|
|||
d.Update(); |
|||
s.Update(); |
|||
|
|||
ProjectionVolumeComponentUI.Inspector.Draw(s, d, o); |
|||
|
|||
d.Apply(); |
|||
} |
|||
|
|||
void OnSceneGUI() |
|||
{ |
|||
for (var i = 0; i < m_TypedTargets.Length; i++) |
|||
DoHandles(m_TypedTargets[i]); |
|||
} |
|||
|
|||
static void DoHandles(ProjectionVolumeComponent target) |
|||
{ |
|||
|
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 355b47aafeafb8443bf3760898b49f20 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System; |
|||
using UnityEditor.AnimatedValues; |
|||
using UnityEngine.Experimental.Rendering.HDPipeline; |
|||
|
|||
namespace UnityEditor.Experimental.Rendering.HDPipeline |
|||
{ |
|||
using _ = CoreEditorUtils; |
|||
using CED = CoreEditorDrawer<ProjectionVolumeUI, SerializedProjectionVolume>; |
|||
|
|||
class ProjectionVolumeUI : BaseUI<SerializedProjectionVolume> |
|||
{ |
|||
static readonly int k_ShapeCount = Enum.GetValues(typeof(ShapeType)).Length; |
|||
|
|||
public static readonly CED.IDrawer SectionShape; |
|||
|
|||
public static readonly CED.IDrawer SectionShapeBox = CED.Action(Drawer_SectionShapeBox); |
|||
public static readonly CED.IDrawer SectionShapeSphere = CED.Action(Drawer_SectionShapeSphere); |
|||
|
|||
static ProjectionVolumeUI() |
|||
{ |
|||
SectionShape = CED.Group( |
|||
CED.Action(Drawer_FieldShapeType), |
|||
CED.FadeGroup( |
|||
(s, d, o, i) => s.IsSectionExpanded_Shape((ShapeType)i), |
|||
true, |
|||
SectionShapeBox, |
|||
SectionShapeSphere |
|||
) |
|||
); |
|||
} |
|||
|
|||
|
|||
public ProjectionVolumeUI() |
|||
: base(k_ShapeCount) |
|||
{ |
|||
|
|||
} |
|||
|
|||
public override void Update() |
|||
{ |
|||
base.Update(); |
|||
SetIsSectionExpanded_Shape((ShapeType)data.shapeType.intValue); |
|||
} |
|||
|
|||
void SetIsSectionExpanded_Shape(ShapeType shape) |
|||
{ |
|||
for (var i = 0; i < k_ShapeCount; i++) |
|||
m_AnimBools[i].target = (int)shape == i; |
|||
} |
|||
|
|||
public AnimBool IsSectionExpanded_Shape(ShapeType shapeType) |
|||
{ |
|||
return m_AnimBools[(int)shapeType]; |
|||
} |
|||
|
|||
static void Drawer_FieldShapeType(ProjectionVolumeUI s, SerializedProjectionVolume d, Editor o) |
|||
{ |
|||
EditorGUILayout.PropertyField(d.shapeType, _.GetContent("Shape Type")); |
|||
} |
|||
|
|||
static void Drawer_SectionShapeBox(ProjectionVolumeUI s, SerializedProjectionVolume d, Editor o) |
|||
{ |
|||
EditorGUILayout.PropertyField(d.boxSize, _.GetContent("Box Size")); |
|||
EditorGUILayout.PropertyField(d.boxOffset, _.GetContent("Box Offset")); |
|||
EditorGUILayout.PropertyField(d.boxInfiniteProjection, _.GetContent("Infinite Projection")); |
|||
} |
|||
|
|||
static void Drawer_SectionShapeSphere(ProjectionVolumeUI s, SerializedProjectionVolume d, Editor o) |
|||
{ |
|||
EditorGUILayout.PropertyField(d.sphereRadius, _.GetContent("Sphere Radius")); |
|||
EditorGUILayout.PropertyField(d.sphereOffset, _.GetContent("Sphere Offset")); |
|||
EditorGUILayout.PropertyField(d.sphereInfiniteProjection, _.GetContent("Infinite Projection")); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 93d6acd797ec99740a1e2c37a27277b7 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using UnityEngine.Experimental.Rendering.HDPipeline; |
|||
|
|||
namespace UnityEditor.Experimental.Rendering.HDPipeline |
|||
{ |
|||
class SerializedProjectionVolume |
|||
{ |
|||
public SerializedProperty root; |
|||
|
|||
public SerializedProperty shapeType; |
|||
public SerializedProperty boxSize; |
|||
public SerializedProperty boxOffset; |
|||
public SerializedProperty boxInfiniteProjection; |
|||
public SerializedProperty sphereRadius; |
|||
public SerializedProperty sphereOffset; |
|||
public SerializedProperty sphereInfiniteProjection; |
|||
|
|||
public SerializedProjectionVolume(SerializedProperty root) |
|||
{ |
|||
this.root = root; |
|||
|
|||
shapeType = root.Find((ProjectionVolume p) => p.shapeType); |
|||
boxSize = root.Find((ProjectionVolume p) => p.boxSize); |
|||
boxOffset = root.Find((ProjectionVolume p) => p.boxOffset); |
|||
boxInfiniteProjection = root.Find((ProjectionVolume p) => p.boxInfiniteProjection); |
|||
sphereRadius = root.Find((ProjectionVolume p) => p.sphereRadius); |
|||
sphereOffset = root.Find((ProjectionVolume p) => p.sphereOffset); |
|||
sphereInfiniteProjection = root.Find((ProjectionVolume p) => p.sphereInfiniteProjection); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 824c577d61e129b4d9d203d1d6cfb0e8 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using UnityEngine.Experimental.Rendering.HDPipeline; |
|||
|
|||
namespace UnityEditor.Experimental.Rendering.HDPipeline |
|||
{ |
|||
class SerializedProjectionVolumeComponent |
|||
{ |
|||
public SerializedObject serializedObject; |
|||
|
|||
public SerializedProjectionVolume projectionVolume; |
|||
|
|||
public SerializedProjectionVolumeComponent(SerializedObject serializedObject) |
|||
{ |
|||
this.serializedObject = serializedObject; |
|||
|
|||
projectionVolume = new SerializedProjectionVolume(serializedObject.Find((ProjectionVolumeComponent c) => c.projectionVolume)); |
|||
} |
|||
|
|||
public void Update() |
|||
{ |
|||
serializedObject.Update(); |
|||
} |
|||
|
|||
public void Apply() |
|||
{ |
|||
serializedObject.ApplyModifiedProperties(); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 2b1d0bff72b8f41449ffffdec532090b |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System; |
|||
|
|||
namespace UnityEngine.Experimental.Rendering.HDPipeline |
|||
{ |
|||
[Serializable] |
|||
public class InfluenceVolume |
|||
{ |
|||
[SerializeField] |
|||
ShapeType m_ShapeType; |
|||
|
|||
// Box
|
|||
[SerializeField] |
|||
Vector3 m_BoxBaseSize; |
|||
[SerializeField] |
|||
Vector3 m_BoxBaseOffset; |
|||
[SerializeField] |
|||
Vector3 m_BoxInfluencePositiveFade; |
|||
[SerializeField] |
|||
Vector3 m_BoxInfluenceNegativeFade; |
|||
[SerializeField] |
|||
Vector3 m_BoxInfluenceNormalPositiveFade; |
|||
[SerializeField] |
|||
Vector3 m_BoxInfluenceNormalNegativeFade; |
|||
|
|||
// Sphere
|
|||
[SerializeField] |
|||
float m_SphereBaseRadius; |
|||
[SerializeField] |
|||
Vector3 m_SphereBaseOffset; |
|||
[SerializeField] |
|||
float m_SphereInfluenceRadius; |
|||
[SerializeField] |
|||
float m_SphereInfluenceNormalRadius; |
|||
|
|||
public ShapeType shapeType { get { return m_ShapeType; } } |
|||
|
|||
public Vector3 boxBaseSize { get { return m_BoxBaseSize; } } |
|||
public Vector3 boxBaseOffset { get { return m_BoxBaseOffset; } } |
|||
public Vector3 boxInfluencePositiveFade { get { return m_BoxInfluencePositiveFade; } } |
|||
public Vector3 boxInfluenceNegativeFade { get { return m_BoxInfluenceNegativeFade; } } |
|||
public Vector3 boxInfluenceNormalPositiveFade { get { return m_BoxInfluenceNormalPositiveFade; } } |
|||
public Vector3 boxInfluenceNormalNegativeFade { get { return m_BoxInfluenceNormalNegativeFade; } } |
|||
|
|||
public float sphereBaseRadius { get { return m_SphereBaseRadius; } } |
|||
public Vector3 sphereBaseOffset { get { return m_SphereBaseOffset; } } |
|||
public float sphereInfluenceRadius { get { return m_SphereInfluenceRadius; } } |
|||
public float sphereInfluenceNormalRadius { get { return m_SphereInfluenceNormalRadius; } } |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: fc8812fa25629fd4aa51622654415050 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System; |
|||
|
|||
namespace UnityEngine.Experimental.Rendering.HDPipeline |
|||
{ |
|||
[Serializable] |
|||
public class ProjectionVolume |
|||
{ |
|||
[SerializeField] |
|||
ShapeType m_ShapeType; |
|||
|
|||
// Box
|
|||
[SerializeField] |
|||
Vector3 m_BoxSize; |
|||
[SerializeField] |
|||
Vector3 m_BoxOffset; |
|||
[SerializeField] |
|||
bool m_BoxInfiniteProjection; |
|||
|
|||
// Sphere
|
|||
[SerializeField] |
|||
float m_SphereRadius; |
|||
[SerializeField] |
|||
Vector3 m_SphereOffset; |
|||
[SerializeField] |
|||
bool m_SphereInfiniteProjection; |
|||
|
|||
|
|||
public ShapeType shapeType { get { return m_ShapeType; } } |
|||
|
|||
public Vector3 boxSize { get { return m_BoxSize; } } |
|||
public Vector3 boxOffset { get { return m_BoxOffset; } } |
|||
public bool boxInfiniteProjection { get { return m_BoxInfiniteProjection; } } |
|||
|
|||
public float sphereRadius { get { return m_SphereRadius; } } |
|||
public Vector3 sphereOffset { get { return m_SphereOffset; } } |
|||
public bool sphereInfiniteProjection { get { return m_SphereInfiniteProjection; } } |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 79a580bb2ae531a489f5c37a4328f44e |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
namespace UnityEngine.Experimental.Rendering.HDPipeline |
|||
{ |
|||
public class ProjectionVolumeComponent : MonoBehaviour |
|||
{ |
|||
[SerializeField] |
|||
ProjectionVolume m_ProjectionVolume = new ProjectionVolume(); |
|||
|
|||
public ProjectionVolume projectionVolume { get { return m_ProjectionVolume; } } |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 86d2527ad2205af4b9326464d02c7642 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
namespace UnityEngine.Experimental.Rendering.HDPipeline |
|||
{ |
|||
public enum ShapeType |
|||
{ |
|||
Box, |
|||
Sphere |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: c453417d96da1a2429bc56a33eea684b |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue