浏览代码

[PlanarReflection] (wip) Added Projection Volume

/main
Frédéric Vauchelles 7 年前
当前提交
467308e8
共有 26 个文件被更改,包括 529 次插入74 次删除
  1. 135
      SampleScenes/HDTest/PlanarReflectionTests.unity
  2. 8
      ScriptableRenderPipeline/Core/CoreRP/Editor/CoreEditorUtils.cs
  3. 8
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Volume.meta
  4. 7
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/PlanarReflectionProbe.cs
  5. 11
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/PlanarReflectionProbe.cs.meta
  6. 8
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumes.meta
  7. 42
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Volume/ProjectionVolumeComponentUI.cs
  8. 11
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Volume/ProjectionVolumeComponentUI.cs.meta
  9. 47
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Volume/ProjectionVolumeEditor.cs
  10. 11
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Volume/ProjectionVolumeEditor.cs.meta
  11. 75
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Volume/ProjectionVolumeUI.cs
  12. 11
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Volume/ProjectionVolumeUI.cs.meta
  13. 30
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Volume/SerializedProjectionVolume.cs
  14. 11
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Volume/SerializedProjectionVolume.cs.meta
  15. 28
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Volume/SerializedProjectionVolumeComponent.cs
  16. 11
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Volume/SerializedProjectionVolumeComponent.cs.meta
  17. 49
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumes/InfluenceVolume.cs
  18. 11
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumes/InfluenceVolume.cs.meta
  19. 38
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumes/ProjectionVolume.cs
  20. 11
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumes/ProjectionVolume.cs.meta
  21. 10
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumes/ProjectionVolumeComponent.cs
  22. 11
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumes/ProjectionVolumeComponent.cs.meta
  23. 8
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumes/ShapeType.cs
  24. 11
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumes/ShapeType.cs.meta

135
SampleScenes/HDTest/PlanarReflectionTests.unity


m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
m_IndirectSpecularColor: {r: 0.07321051, g: 0.076927215, b: 0.08504366, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:

m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 547467865}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 2, z: 0}
m_LocalPosition: {x: 0, y: 3.1386204, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1596124444}

m_Resolution: 128
m_UpdateFrequency: 0
m_BoxSize: {x: 20, y: 10, z: 20}
m_BoxOffset: {x: 0, y: 3, z: 0}
m_BoxOffset: {x: 0, y: 1.8613796, z: 0}
m_NearClip: 0.3
m_FarClip: 1000
m_ShadowDistance: 100

m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_StaticEditorFlags: 4294967295
m_IsActive: 1
--- !u!4 &556113918
Transform:

m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_StaticEditorFlags: 4294967295
m_IsActive: 1
--- !u!4 &743933948
Transform:

m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 807142868}
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &811854587
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 811854589}
- component: {fileID: 811854588}
m_Layer: 0
m_Name: Volume
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &811854588
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 811854587}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3}
m_Name:
m_EditorClassIdentifier:
isGlobal: 1
priority: 0
blendDistance: 0
weight: 1
sharedProfile: {fileID: 11400000, guid: 0d615c3f4f4e27d44af6c4fed3bb683c, type: 2}
--- !u!4 &811854589
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 811854587}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &821409524
GameObject:
m_ObjectHideFlags: 0

- component: {fileID: 971539803}
- component: {fileID: 971539806}
- component: {fileID: 971539805}
- component: {fileID: 971539804}
m_StaticEditorFlags: 0
m_StaticEditorFlags: 4294967295
m_IsActive: 1
--- !u!4 &971539803
Transform:

m_Father: {fileID: 1192322822}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!64 &971539804
MeshCollider:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 971539802}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 3
m_Convex: 0
m_CookingOptions: 14
m_SkinWidth: 0.01
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &971539805
MeshRenderer:
m_ObjectHideFlags: 0

m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_StaticEditorFlags: 4294967295
m_IsActive: 1
--- !u!4 &1207854011
Transform:

m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_StaticEditorFlags: 4294967295
m_IsActive: 1
--- !u!4 &1250450217
Transform:

- {fileID: 1179256903}
- {fileID: 1596124444}
m_Father: {fileID: 0}
m_RootOrder: 3
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1324310548
GameObject:

m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_StaticEditorFlags: 4294967295
m_IsActive: 1
--- !u!4 &1562837667
Transform:

m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 547467866}
- {fileID: 1654939276}
m_Father: {fileID: 1306845494}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1623506277}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &1654939275
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1654939276}
- component: {fileID: 1654939277}
m_Layer: 0
m_Name: Projection Volume
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1654939276
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1654939275}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1596124444}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1654939277
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1654939275}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 86d2527ad2205af4b9326464d02c7642, type: 3}
m_Name:
m_EditorClassIdentifier:
m_ProjectionVolume:
m_ShapeType: 0
m_BoxSize: {x: 0, y: 0, z: 0}
m_BoxOffset: {x: 0, y: 0, z: 0}
m_BoxInfiniteProjection: 0
m_SphereRadius: 0
m_SphereOffset: {x: 0, y: 0, z: 0}
m_SphereInfiniteProjection: 0
--- !u!1 &1662809620
GameObject:
m_ObjectHideFlags: 0

m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_StaticEditorFlags: 4294967295
m_IsActive: 1
--- !u!4 &1927838485
Transform:

m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_StaticEditorFlags: 4294967295
m_IsActive: 1
--- !u!4 &2037444866
Transform:

m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_StaticEditorFlags: 4294967295
m_IsActive: 1
--- !u!4 &2077996853
Transform:

8
ScriptableRenderPipeline/Core/CoreRP/Editor/CoreEditorUtils.cs


using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Text;
using UnityEngine;

var members = new List<string>();
while (me != null)
{
members.Add(me.Member.Name);
// For field, get the field name
// For properties, get the name of the backing field
var name = me.Member is FieldInfo
? me.Member.Name
: "m_" + me.Member.Name.Substring(0, 1).ToUpper() + me.Member.Name.Substring(1);
members.Add(name);
me = me.Expression as MemberExpression;
}

8
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Volume.meta


fileFormatVersion: 2
guid: 9fa44d86e3857954a9a2b40a5cf10bd4
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

7
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/PlanarReflectionProbe.cs


namespace UnityEngine.Experimental.Rendering
{
class PlanarReflectionProbe
{
}
}

11
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/PlanarReflectionProbe.cs.meta


fileFormatVersion: 2
guid: a4ee7c3a3b205a14a94094d01ff91d6b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

8
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumes.meta


fileFormatVersion: 2
guid: 19d2fc993bedec24d99f5a3af8752c39
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

42
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Volume/ProjectionVolumeComponentUI.cs


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();
}
}
}

11
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Volume/ProjectionVolumeComponentUI.cs.meta


fileFormatVersion: 2
guid: 4db48f42cf8b74e4b973195bf39276a0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

47
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Volume/ProjectionVolumeEditor.cs


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)
{
}
}
}

11
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Volume/ProjectionVolumeEditor.cs.meta


fileFormatVersion: 2
guid: 355b47aafeafb8443bf3760898b49f20
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

75
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Volume/ProjectionVolumeUI.cs


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"));
}
}
}

11
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Volume/ProjectionVolumeUI.cs.meta


fileFormatVersion: 2
guid: 93d6acd797ec99740a1e2c37a27277b7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

30
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Volume/SerializedProjectionVolume.cs


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);
}
}
}

11
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Volume/SerializedProjectionVolume.cs.meta


fileFormatVersion: 2
guid: 824c577d61e129b4d9d203d1d6cfb0e8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

28
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Volume/SerializedProjectionVolumeComponent.cs


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();
}
}
}

11
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Volume/SerializedProjectionVolumeComponent.cs.meta


fileFormatVersion: 2
guid: 2b1d0bff72b8f41449ffffdec532090b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

49
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumes/InfluenceVolume.cs


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; } }
}
}

11
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumes/InfluenceVolume.cs.meta


fileFormatVersion: 2
guid: fc8812fa25629fd4aa51622654415050
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

38
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumes/ProjectionVolume.cs


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; } }
}
}

11
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumes/ProjectionVolume.cs.meta


fileFormatVersion: 2
guid: 79a580bb2ae531a489f5c37a4328f44e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

10
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumes/ProjectionVolumeComponent.cs


namespace UnityEngine.Experimental.Rendering.HDPipeline
{
public class ProjectionVolumeComponent : MonoBehaviour
{
[SerializeField]
ProjectionVolume m_ProjectionVolume = new ProjectionVolume();
public ProjectionVolume projectionVolume { get { return m_ProjectionVolume; } }
}
}

11
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumes/ProjectionVolumeComponent.cs.meta


fileFormatVersion: 2
guid: 86d2527ad2205af4b9326464d02c7642
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

8
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumes/ShapeType.cs


namespace UnityEngine.Experimental.Rendering.HDPipeline
{
public enum ShapeType
{
Box,
Sphere
}
}

11
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumes/ShapeType.cs.meta


fileFormatVersion: 2
guid: c453417d96da1a2429bc56a33eea684b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存