summaryrefslogtreecommitdiff
path: root/Thronefall_1_57/Decompile/FlatKit/FogSettings.cs
blob: 60e5eb00e23bedf867a3cff06f11865ceebc6fbc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
using UnityEngine;
using UnityEngine.Rendering.Universal;

namespace FlatKit;

[CreateAssetMenu(fileName = "FogSettings", menuName = "FlatKit/Fog Settings")]
public class FogSettings : ScriptableObject
{
	[Header("Distance Fog")]
	public bool useDistance = true;

	public Gradient distanceGradient;

	public float near;

	public float far = 100f;

	[Range(0f, 1f)]
	public float distanceFogIntensity = 1f;

	public bool useDistanceFogOnSky;

	[Header("Height Fog")]
	[Space]
	public bool useHeight;

	public Gradient heightGradient;

	public float low;

	public float high = 10f;

	[Range(0f, 1f)]
	public float heightFogIntensity = 1f;

	public bool useHeightFogOnSky;

	[Header("Blending")]
	[Space]
	[Range(0f, 1f)]
	public float distanceHeightBlend = 0.5f;

	[Header("Advanced settings")]
	[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;

	private void OnValidate()
	{
		if (low > high)
		{
			Debug.LogWarning("[FlatKit] Fog Height configuration error: 'Low' must not be greater than 'High'");
		}
		if (near > far)
		{
			Debug.LogWarning("[FlatKit] Fog Distance configuration error: 'Near' must not be greater than 'Far'");
		}
	}
}