summaryrefslogtreecommitdiff
path: root/Valheim_v0.141.2_r202102/Valheim/assembly_postprocessing/UnityEngine.PostProcessing/BloomModel.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Valheim_v0.141.2_r202102/Valheim/assembly_postprocessing/UnityEngine.PostProcessing/BloomModel.cs')
-rw-r--r--Valheim_v0.141.2_r202102/Valheim/assembly_postprocessing/UnityEngine.PostProcessing/BloomModel.cs117
1 files changed, 117 insertions, 0 deletions
diff --git a/Valheim_v0.141.2_r202102/Valheim/assembly_postprocessing/UnityEngine.PostProcessing/BloomModel.cs b/Valheim_v0.141.2_r202102/Valheim/assembly_postprocessing/UnityEngine.PostProcessing/BloomModel.cs
new file mode 100644
index 0000000..0569d62
--- /dev/null
+++ b/Valheim_v0.141.2_r202102/Valheim/assembly_postprocessing/UnityEngine.PostProcessing/BloomModel.cs
@@ -0,0 +1,117 @@
+using System;
+
+namespace UnityEngine.PostProcessing;
+
+[Serializable]
+public class BloomModel : PostProcessingModel
+{
+ [Serializable]
+ public struct BloomSettings
+ {
+ [Min(0f)]
+ [Tooltip("Strength of the bloom filter.")]
+ public float intensity;
+
+ [Min(0f)]
+ [Tooltip("Filters out pixels under this level of brightness.")]
+ public float threshold;
+
+ [Range(0f, 1f)]
+ [Tooltip("Makes transition between under/over-threshold gradual (0 = hard threshold, 1 = soft threshold).")]
+ public float softKnee;
+
+ [Range(1f, 7f)]
+ [Tooltip("Changes extent of veiling effects in a screen resolution-independent fashion.")]
+ public float radius;
+
+ [Tooltip("Reduces flashing noise with an additional filter.")]
+ public bool antiFlicker;
+
+ public float thresholdLinear
+ {
+ get
+ {
+ return Mathf.GammaToLinearSpace(threshold);
+ }
+ set
+ {
+ threshold = Mathf.LinearToGammaSpace(value);
+ }
+ }
+
+ public static BloomSettings defaultSettings
+ {
+ get
+ {
+ BloomSettings result = default(BloomSettings);
+ result.intensity = 0.5f;
+ result.threshold = 1.1f;
+ result.softKnee = 0.5f;
+ result.radius = 4f;
+ result.antiFlicker = false;
+ return result;
+ }
+ }
+ }
+
+ [Serializable]
+ public struct LensDirtSettings
+ {
+ [Tooltip("Dirtiness texture to add smudges or dust to the lens.")]
+ public Texture texture;
+
+ [Min(0f)]
+ [Tooltip("Amount of lens dirtiness.")]
+ public float intensity;
+
+ public static LensDirtSettings defaultSettings
+ {
+ get
+ {
+ LensDirtSettings result = default(LensDirtSettings);
+ result.texture = null;
+ result.intensity = 3f;
+ return result;
+ }
+ }
+ }
+
+ [Serializable]
+ public struct Settings
+ {
+ public BloomSettings bloom;
+
+ public LensDirtSettings lensDirt;
+
+ public static Settings defaultSettings
+ {
+ get
+ {
+ Settings result = default(Settings);
+ result.bloom = BloomSettings.defaultSettings;
+ result.lensDirt = LensDirtSettings.defaultSettings;
+ return result;
+ }
+ }
+ }
+
+ [SerializeField]
+ private Settings m_Settings = Settings.defaultSettings;
+
+ public Settings settings
+ {
+ get
+ {
+ return m_Settings;
+ }
+ set
+ {
+ m_Settings = value;
+ }
+ }
+
+ public override void Reset()
+ {
+ m_Settings = Settings.defaultSettings;
+ }
+}