Sebastien Lagarde
8 年前
当前提交
4f0ce374
共有 6 个文件被更改,包括 95 次插入 和 62 次删除
-
62Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/AmbientOcclusion/AmbientOcclusion.cs
-
3Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/AmbientOcclusion/Resources/Estimation.hlsl
-
55Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/AmbientOcclusion/ScreenSpaceAmbientOcclusionSettings.cs
-
12Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/AmbientOcclusion/ScreenSpaceAmbientOcclusionSettings.cs.meta
-
13Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/AmbientOcclusion/ScreenSpaceAmbientOcclusionSettingsSingleton.cs
-
12Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/AmbientOcclusion/ScreenSpaceAmbientOcclusionSettingsSingleton.cs.meta
|
|||
using System; |
|||
|
|||
namespace UnityEngine.Experimental.Rendering.HDPipeline |
|||
{ |
|||
public class ScreenSpaceAmbientOcclusionSettings : ScriptableObject |
|||
{ |
|||
[Serializable] |
|||
public struct Settings |
|||
{ |
|||
[SerializeField] |
|||
bool m_Enable; |
|||
|
|||
[SerializeField] |
|||
float m_Intensity; |
|||
[SerializeField] |
|||
float m_Radius; |
|||
|
|||
[SerializeField] |
|||
int m_SampleCount; |
|||
[SerializeField] |
|||
bool m_Downsampling; |
|||
|
|||
public bool enable { set { m_Enable = value; } get { return m_Enable; } } |
|||
public float intensity { set { m_Intensity = value; OnValidate(); } get { return m_Intensity; } } |
|||
public float radius { set { m_Radius = value; OnValidate(); } get { return m_Radius; } } |
|||
public int sampleCount { set { m_SampleCount = value; OnValidate(); } get { return m_SampleCount; } } |
|||
public bool downsampling { set { m_Downsampling = value; } get { return m_Downsampling; } } |
|||
|
|||
void OnValidate() |
|||
{ |
|||
m_Intensity = Mathf.Min(2, Mathf.Max(0, m_Intensity)); |
|||
m_Radius = Mathf.Max(0, m_Radius); |
|||
m_SampleCount = Mathf.Min(1, Mathf.Max(32, m_SampleCount)); |
|||
} |
|||
|
|||
public static readonly Settings s_Defaultsettings = new Settings |
|||
{ |
|||
m_Enable = false, |
|||
m_Intensity = 1.0f, |
|||
m_Radius = 0.5f, |
|||
m_SampleCount = 8, |
|||
m_Downsampling = true |
|||
}; |
|||
} |
|||
|
|||
[SerializeField] |
|||
Settings m_Settings = Settings.s_Defaultsettings; |
|||
|
|||
public Settings settings |
|||
{ |
|||
get { return m_Settings; } |
|||
set { m_Settings = value; } |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: d7d48b3fd85781a41844f6983c10d47d |
|||
timeCreated: 1496196658 |
|||
licenseType: Pro |
|||
MonoImporter: |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
namespace UnityEngine.Experimental.Rendering.HDPipeline |
|||
{ |
|||
public class ScreenSpaceAmbientOcclusionSettingsSingleton : Singleton<ScreenSpaceAmbientOcclusionSettingsSingleton> |
|||
{ |
|||
private ScreenSpaceAmbientOcclusionSettings settings { get; set; } |
|||
|
|||
public static ScreenSpaceAmbientOcclusionSettings overrideSettings |
|||
{ |
|||
get { return instance.settings; } |
|||
set { instance.settings = value; } |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 5da3bcf229fbf3d4ab232413e3a07457 |
|||
timeCreated: 1496196658 |
|||
licenseType: Pro |
|||
MonoImporter: |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue