First Commit
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Golems
|
||||
{
|
||||
[CreateAssetMenu(fileName = "New AlbertGhostMemorySettings",
|
||||
menuName = "Golems/Scriptable Render Features/AlbertGhostMemorySettings")]
|
||||
public class AlbertGhostMemorySettings : ScriptableObject
|
||||
{
|
||||
[SerializeField] private Vector3 m_LightDirection;
|
||||
|
||||
public Vector3 LightDirection
|
||||
{
|
||||
get => m_LightDirection;
|
||||
set => m_LightDirection = value;
|
||||
}
|
||||
|
||||
[SerializeField] private Color m_LightColour = Color.white;
|
||||
|
||||
public Color LightColour
|
||||
{
|
||||
get => m_LightColour;
|
||||
set => m_LightColour = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Effects how far off centre each Blur sample becomes
|
||||
/// </summary>
|
||||
[Tooltip("Effects how far off centre each Blur sample becomes. Note, the bigger the number, the bigger the pixelation")]
|
||||
[Range(0.01f, 10.0f)][SerializeField] private float m_BlurRadius = .5f;
|
||||
public float BlurRadius => m_BlurRadius;
|
||||
|
||||
/// <summary>
|
||||
/// The number of Blur passes performed.
|
||||
/// This effects ALL objects rendered
|
||||
/// </summary>
|
||||
[Tooltip("How many times we Blur all the objects. Note, the bigger the number, the bigger the performance hit")]
|
||||
[Range(1, 10)][SerializeField] private int m_BlurPasses = 4;
|
||||
public int BlurPasses => m_BlurPasses;
|
||||
|
||||
/// <summary>
|
||||
/// Index into the m_BlurTextureSizes
|
||||
/// </summary>
|
||||
[Range(0,4)] [SerializeField] private int m_BlurTextureSize = 3;
|
||||
|
||||
/// <summary>
|
||||
/// Texture size of the blur textures
|
||||
/// </summary>
|
||||
private int[] m_BlurTextureSizes = new int[5] { 128, 256, 512, 1024, 2048 };
|
||||
|
||||
/// <summary>
|
||||
/// Returns the current Blur Texture resolution driven by m_BlurTextureSize
|
||||
/// </summary>
|
||||
public int BlurTextureResolution => m_BlurTextureSizes[
|
||||
Mathf.Max(0, Mathf.Min(m_BlurTextureSize, m_BlurTextureSizes.Length - 1))];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user