Frédéric Vauchelles
7 年前
当前提交
659b634a
共有 23 个文件被更改,包括 461 次插入 和 151 次删除
-
50ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugDisplay.cs
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugFullScreen.shader
-
32ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Reflection/ScreenSpaceRefractionEditor.cs
-
20ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Material/Lit/LitUI.cs
-
7ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipeline.cs
-
6ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDStringConstants.cs
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/LightLoop.cs
-
8ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/LightLoop.hlsl
-
26ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Reflection/ScreenSpaceRefraction.cs
-
4ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Reflection/ScreenSpaceTracing.hlsl
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/Lit.cs
-
8ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/Lit.cs.hlsl
-
252ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/Lit.hlsl
-
4ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/Lit.shader
-
4ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/LitTessellation.shader
-
14ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Reflection/HDScreenSpaceReflectionEditor.cs
-
11ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Reflection/HDScreenSpaceReflectionEditor.cs.meta
-
40ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Reflection/ScreenSpaceLightingEditor.cs
-
11ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Reflection/ScreenSpaceLightingEditor.cs.meta
-
49ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Reflection/ScreenSpaceLighting.cs
-
11ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Reflection/ScreenSpaceLighting.cs.meta
-
38ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Reflection/ScreenSpaceReflection.cs
-
11ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Reflection/ScreenSpaceReflection.cs.meta
|
|||
using System.Collections; |
|||
using UnityEngine; |
|||
using UnityEditor; |
|||
using UnityEditor.Experimental.Rendering; |
|||
|
|||
namespace UnityEngine.Experimental.Rendering.HDPipeline |
|||
{ |
|||
[CanEditMultipleObjects] |
|||
[VolumeComponentEditor(typeof(ScreenSpaceReflection))] |
|||
public class HDScreenSpaceReflectionEditor : ScreenSpaceLightingEditor |
|||
{ |
|||
|
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: e1a6d5f7801c9c749a3f7d3bf4294e87 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System.Collections; |
|||
using UnityEngine; |
|||
using UnityEditor; |
|||
using UnityEditor.Experimental.Rendering; |
|||
|
|||
namespace UnityEngine.Experimental.Rendering.HDPipeline |
|||
{ |
|||
public class ScreenSpaceLightingEditor : VolumeComponentEditor |
|||
{ |
|||
SerializedDataParameter m_RayMinLevel; |
|||
SerializedDataParameter m_RayMaxLevel; |
|||
SerializedDataParameter m_RayMaxIterations; |
|||
SerializedDataParameter m_RayDepthSuccessBias; |
|||
SerializedDataParameter m_ScreenWeightDistance; |
|||
|
|||
public override void OnEnable() |
|||
{ |
|||
var o = new PropertyFetcher<ScreenSpaceRefraction>(serializedObject); |
|||
|
|||
m_RayMinLevel = Unpack(o.Find(x => x.rayMinLevel)); |
|||
m_RayMaxLevel = Unpack(o.Find(x => x.rayMaxLevel)); |
|||
m_RayMaxIterations = Unpack(o.Find(x => x.rayMaxIterations)); |
|||
m_RayDepthSuccessBias = Unpack(o.Find(x => x.rayDepthSuccessBias)); |
|||
m_ScreenWeightDistance = Unpack(o.Find(x => x.screenWeightDistance)); |
|||
} |
|||
|
|||
public override void OnInspectorGUI() |
|||
{ |
|||
EditorGUILayout.LabelField(CoreEditorUtils.GetContent("HiZ Settings")); |
|||
PropertyField(m_RayMinLevel, CoreEditorUtils.GetContent("Ray Min Level")); |
|||
PropertyField(m_RayMaxLevel, CoreEditorUtils.GetContent("Ray Max Level")); |
|||
PropertyField(m_RayMaxIterations, CoreEditorUtils.GetContent("Ray Max Iterations")); |
|||
PropertyField(m_RayDepthSuccessBias, CoreEditorUtils.GetContent("Ray Depth Success Bias")); |
|||
|
|||
EditorGUILayout.Separator(); |
|||
EditorGUILayout.LabelField(CoreEditorUtils.GetContent("Common Settings")); |
|||
PropertyField(m_ScreenWeightDistance, CoreEditorUtils.GetContent("Screen Weight Distance")); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 5a0cc6d88bd0be54283043dc53877a64 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System; |
|||
using UnityEngine.Rendering; |
|||
|
|||
namespace UnityEngine.Experimental.Rendering.HDPipeline |
|||
{ |
|||
[Serializable] |
|||
public abstract class ScreenSpaceLighting : VolumeComponent |
|||
{ |
|||
int m_RayMinLevelID; |
|||
int m_RayMaxLevelID; |
|||
int m_RayMaxIterationsID; |
|||
int m_RayDepthSuccessBiasID; |
|||
int m_InvScreenWeightDistanceID; |
|||
|
|||
public IntParameter rayMinLevel = new IntParameter(2); |
|||
public IntParameter rayMaxLevel = new IntParameter(6); |
|||
public IntParameter rayMaxIterations = new IntParameter(32); |
|||
public FloatParameter rayDepthSuccessBias = new FloatParameter(0.1f); |
|||
public ClampedFloatParameter screenWeightDistance = new ClampedFloatParameter(0.1f, 0, 1); |
|||
|
|||
public virtual void PushShaderParameters(CommandBuffer cmd) |
|||
{ |
|||
cmd.SetGlobalInt(m_RayMinLevelID, rayMinLevel.value); |
|||
cmd.SetGlobalInt(m_RayMaxLevelID, rayMaxLevel.value); |
|||
cmd.SetGlobalInt(m_RayMaxIterationsID, rayMaxIterations.value); |
|||
cmd.SetGlobalFloat(m_RayDepthSuccessBiasID, rayDepthSuccessBias.value); |
|||
cmd.SetGlobalFloat(m_InvScreenWeightDistanceID, 1f / screenWeightDistance.value); |
|||
} |
|||
|
|||
protected abstract void FetchIDs( |
|||
out int rayMinLevelID, |
|||
out int rayMaxLevelID, |
|||
out int rayMaxIterationsID, |
|||
out int rayDepthSuccessBiasID, |
|||
out int invScreenWeightDistanceID |
|||
); |
|||
|
|||
void Awake() |
|||
{ |
|||
FetchIDs( |
|||
out m_RayMinLevelID, |
|||
out m_RayMaxLevelID, |
|||
out m_RayMaxIterationsID, |
|||
out m_RayDepthSuccessBiasID, |
|||
out m_InvScreenWeightDistanceID |
|||
); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: abafd8c0d3ca56d44b9469b2b67fc7cc |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System; |
|||
using UnityEngine.Rendering; |
|||
|
|||
namespace UnityEngine.Experimental.Rendering.HDPipeline |
|||
{ |
|||
[Serializable] |
|||
public class ScreenSpaceReflection : ScreenSpaceLighting |
|||
{ |
|||
static ScreenSpaceReflection s_Default = null; |
|||
public static ScreenSpaceReflection @default |
|||
{ |
|||
get |
|||
{ |
|||
if (s_Default == null) |
|||
{ |
|||
s_Default = ScriptableObject.CreateInstance<ScreenSpaceReflection>(); |
|||
s_Default.hideFlags = HideFlags.HideAndDontSave; |
|||
} |
|||
return s_Default; |
|||
} |
|||
} |
|||
|
|||
protected override void FetchIDs( |
|||
out int rayMinLevelID, |
|||
out int rayMaxLevelID, |
|||
out int rayMaxIterationsID, |
|||
out int rayDepthSuccessBiasID, |
|||
out int screenWeightDistanceID |
|||
) |
|||
{ |
|||
rayMinLevelID = HDShaderIDs._SSReflectionRayMinLevel; |
|||
rayMaxLevelID = HDShaderIDs._SSReflectionRayMaxLevel; |
|||
rayMaxIterationsID = HDShaderIDs._SSReflectionRayMaxIterations; |
|||
rayDepthSuccessBiasID = HDShaderIDs._SSReflectionRayDepthSuccessBias; |
|||
screenWeightDistanceID = HDShaderIDs._SSReflectionInvScreenWeightDistance; |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 384c4d03a551c44448145f4093304119 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue