diff options
| author | chai <215380520@qq.com> | 2024-05-19 16:05:58 +0800 |
|---|---|---|
| committer | chai <215380520@qq.com> | 2024-05-19 16:05:58 +0800 |
| commit | 8e13e7e2874adc8982e16d1d2ed2e28d7480b45f (patch) | |
| tree | 63ef85c460288891f5a593d69afeca16cba050b3 /Thronefall_1_57/Decompile/FlatKit/OutlineSettings.cs | |
| parent | c5f145786f4c6d2fe4bea831dfc16e52228920a5 (diff) | |
+1.57
Diffstat (limited to 'Thronefall_1_57/Decompile/FlatKit/OutlineSettings.cs')
| -rw-r--r-- | Thronefall_1_57/Decompile/FlatKit/OutlineSettings.cs | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/Thronefall_1_57/Decompile/FlatKit/OutlineSettings.cs b/Thronefall_1_57/Decompile/FlatKit/OutlineSettings.cs new file mode 100644 index 0000000..47a6b97 --- /dev/null +++ b/Thronefall_1_57/Decompile/FlatKit/OutlineSettings.cs @@ -0,0 +1,61 @@ +using UnityEngine; +using UnityEngine.Rendering.Universal; + +namespace FlatKit; + +[CreateAssetMenu(fileName = "OutlineSettings", menuName = "FlatKit/Outline Settings")] +public class OutlineSettings : ScriptableObject +{ + public Color edgeColor = Color.white; + + [Range(0f, 5f)] + public int thickness = 1; + + [Tooltip("If enabled, the line width will stay constant regardless of the rendering resolution. However, some of the lines may appear blurry.")] + public bool resolutionInvariant; + + [Space] + public bool useDepth = true; + + public bool useNormals; + + public bool useColor; + + [Header("Advanced settings")] + public float minDepthThreshold; + + public float maxDepthThreshold = 0.25f; + + [Space] + public float minNormalsThreshold; + + public float maxNormalsThreshold = 0.25f; + + [Space] + public float minColorThreshold; + + public float maxColorThreshold = 0.25f; + + [Space] + [Tooltip("The render stage at which the effect is applied. To exclude transparent objects, like water or UI elements, set this to \"Before Transparent\".")] + public RenderPassEvent renderEvent = RenderPassEvent.BeforeRenderingPostProcessing; + + [Space] + public bool outlineOnly; + + private void OnValidate() + { + if (minDepthThreshold > maxDepthThreshold) + { + Debug.LogWarning("[FlatKit] Outline configuration error: 'Min Depth Threshold' must not be greater than 'Max Depth Threshold'"); + } + if (minNormalsThreshold > maxNormalsThreshold) + { + Debug.LogWarning("[FlatKit] Outline configuration error: 'Min Normals Threshold' must not be greater than 'Max Normals Threshold'"); + } + if (minColorThreshold > maxColorThreshold) + { + Debug.LogWarning("[FlatKit] Outline configuration error: 'Min Color Threshold' must not be greater than 'Max Color Threshold'"); + } + } +} |
