diff --git a/.vs/PortiaMods/v16/.suo b/.vs/PortiaMods/v16/.suo
index ced90de..2a27dc9 100644
Binary files a/.vs/PortiaMods/v16/.suo and b/.vs/PortiaMods/v16/.suo differ
diff --git a/Environment/Main.cs b/Environment/Main.cs
index 2f37615..dad8fef 100644
--- a/Environment/Main.cs
+++ b/Environment/Main.cs
@@ -17,6 +17,11 @@ public static partial class Main
private static bool isDebug = false;
private static float labelWidth = 80f;
private static float indentSpace = 30f;
+ private static string[] toneMappers = new string[] {
+ "None",
+ "ACES",
+ "Neutral"
+ };
public static void Dbgl(string str = "", bool pref = true)
{
@@ -63,8 +68,6 @@ private static void OnGUI(UnityModManager.ModEntry modEntry)
GUILayout.EndHorizontal();
GUILayout.Space(20f);
- GUILayout.Space(20f);
-
settings.colorsShow = GUILayout.Toggle(settings.colorsShow, $"Color Variables", new GUILayoutOption[0]);
GUILayout.Space(10f);
if (settings.colorsShow)
@@ -131,133 +134,6 @@ private static void OnGUI(UnityModManager.ModEntry modEntry)
GUILayout.EndHorizontal();
}
- settings.processingShow = GUILayout.Toggle(settings.processingShow, $"PostProcessing Variables", new GUILayoutOption[0]);
- if (settings.processingShow)
- {
- GUILayout.Space(10f);
- GUILayout.BeginHorizontal();
- GUILayout.Space(indentSpace);
- GUILayout.BeginVertical();
- settings.customVignette = GUILayout.Toggle(settings.customVignette, $"Use Custom Vignette", new GUILayoutOption[0]);
- if (settings.customVignette)
- {
- GUILayout.Space(10f);
- GUILayout.BeginHorizontal();
- GUILayout.Space(indentSpace);
- GUILayout.BeginVertical();
-
- GUILayout.Label("Color", new GUILayoutOption[0]);
-
- GUILayout.BeginHorizontal();
- GUILayout.Space(indentSpace);
- GUILayout.BeginVertical();
-
- GUILayout.Label(string.Format("Red: {0:F2} ", settings.vignetteColorRed), new GUILayoutOption[] { GUILayout.Width(labelWidth) });
- settings.vignetteColorRed = GUILayout.HorizontalSlider((float)settings.vignetteColorRed * 100f, 0, 100f) / 100f;
- GUILayout.Label(string.Format("Green: {0:F2} ", settings.vignetteColorRed), new GUILayoutOption[] { GUILayout.Width(labelWidth) });
- settings.vignetteColorGreen = GUILayout.HorizontalSlider((float)settings.vignetteColorGreen * 100f, 0, 100f) / 100f;
- GUILayout.Label(string.Format("Blue: {0:F2} ", settings.vignetteColorBlue), new GUILayoutOption[] { GUILayout.Width(labelWidth) });
- settings.vignetteColorBlue = GUILayout.HorizontalSlider((float)settings.vignetteColorBlue * 100f, 0, 100f) / 100f;
- GUILayout.Label(string.Format("Alpha: {0:F2} ", settings.vignetteColorAlpha), new GUILayoutOption[] { GUILayout.Width(labelWidth) });
- settings.vignetteColorAlpha = GUILayout.HorizontalSlider((float)settings.vignetteColorAlpha * 100f, 0, 100f) / 100f;
- GUILayout.EndVertical();
- GUILayout.EndHorizontal();
-
- GUILayout.Space(10f);
-
-
- GUILayout.Label("Center", new GUILayoutOption[0]);
-
- GUILayout.BeginHorizontal();
- GUILayout.Space(indentSpace);
- GUILayout.BeginVertical();
-
- GUILayout.Label(string.Format("X: {0:F2} ", settings.vignetteX), new GUILayoutOption[] { GUILayout.Width(labelWidth) });
- settings.vignetteX = GUILayout.HorizontalSlider((float)settings.vignetteX * 100f, 0, 100f) / 100f;
- GUILayout.Label(string.Format("Y: {0:F2} ", settings.vignetteY), new GUILayoutOption[] { GUILayout.Width(labelWidth) });
- settings.vignetteY = GUILayout.HorizontalSlider((float)settings.vignetteY * 100f, 0, 100f) / 100f;
- GUILayout.EndVertical();
- GUILayout.EndHorizontal();
-
-
- GUILayout.Space(10f);
-
- GUILayout.Label(string.Format("Intensity {0:F2} ", settings.vignetteIntensity), new GUILayoutOption[0]);
- settings.vignetteIntensity = GUILayout.HorizontalSlider((float)settings.vignetteIntensity * 100f, 0, 100f) / 100f;
-
- GUILayout.Space(10f);
-
-
- GUILayout.Label(string.Format("Smoothness {0:F2} ", settings.vignetteSmoothness), new GUILayoutOption[0]);
- settings.vignetteSmoothness = GUILayout.HorizontalSlider((float)settings.vignetteSmoothness * 100f, 1, 100f) / 100f;
-
- GUILayout.Space(10f);
-
-
- GUILayout.Label(string.Format("Roundness {0:F2} ", settings.vignetteRoundness), new GUILayoutOption[0]);
- settings.vignetteRoundness = GUILayout.HorizontalSlider((float)settings.vignetteRoundness * 100f, 0, 100f) / 100f;
-
- GUILayout.Space(10f);
-
- settings.vignetteRounded = GUILayout.Toggle(settings.vignetteRounded, "Force round vignette", new GUILayoutOption[0]);
-
- GUILayout.EndVertical();
- GUILayout.EndHorizontal();
-
- }
- GUILayout.Space(10f);
- settings.customBloom = GUILayout.Toggle(settings.customBloom, "Use Custom Bloom", new GUILayoutOption[0]);
- if (settings.customBloom)
- {
- GUILayout.Space(10f);
- GUILayout.BeginHorizontal();
- GUILayout.Space(indentSpace);
- GUILayout.BeginVertical();
-
- GUILayout.Label(string.Format("Intensity {0:F2} ", settings.bloomIntensity), new GUILayoutOption[0]);
- settings.bloomIntensity = GUILayout.HorizontalSlider((float)settings.bloomIntensity * 100f, 0, 1000f) / 100f;
-
- GUILayout.Space(10f);
-
-
- GUILayout.Label(string.Format("Threshold {0:F2} ", settings.bloomThreshold), new GUILayoutOption[0]);
- settings.bloomThreshold = GUILayout.HorizontalSlider((float)settings.bloomThreshold * 100f, 0, 1000f) / 100f;
-
- GUILayout.Space(10f);
-
-
- GUILayout.Label(string.Format("Soft Knee {0:F2} ", settings.bloomSoftKnee), new GUILayoutOption[0]);
- settings.bloomSoftKnee = GUILayout.HorizontalSlider((float)settings.bloomSoftKnee * 100f, 0, 100f) / 100f;
-
- GUILayout.Space(10f);
-
-
- GUILayout.Label(string.Format("Radius {0:F2} ", settings.bloomRadius), new GUILayoutOption[0]);
- settings.bloomRadius = GUILayout.HorizontalSlider((float)settings.bloomRadius * 10f, 10, 70f) / 10f;
-
- GUILayout.Space(10f);
-
-
- GUILayout.Label(string.Format("Lens Dirt Intensity {0:F2} ", settings.bloomLensDirtIntensity), new GUILayoutOption[0]);
- settings.bloomLensDirtIntensity = GUILayout.HorizontalSlider((float)settings.bloomLensDirtIntensity * 100f, 0, 1000f) / 100f;
-
- GUILayout.Space(10f);
-
-
- settings.bloomAntiFlicker = GUILayout.Toggle(settings.bloomAntiFlicker, "Anti-flicker", new GUILayoutOption[0]);
-
- GUILayout.Space(10f);
- GUILayout.EndVertical();
- GUILayout.EndHorizontal();
-
- }
-
- GUILayout.Space(10f);
-
- GUILayout.EndVertical();
- GUILayout.EndHorizontal();
-
- }
GUILayout.Space(20f);
}
diff --git a/Environment/Patches.cs b/Environment/Patches.cs
index d7ecb35..470b634 100644
--- a/Environment/Patches.cs
+++ b/Environment/Patches.cs
@@ -255,86 +255,5 @@ static void Prefix(ref Sky __instance)
}
}
- private static bool defaultPostProcessingSet = false;
- private static VignetteModel.Settings defaultVignetteSettings;
- private static BloomModel.Settings defaultBloomSettings;
-
- [HarmonyPatch(typeof(PostProcessingBehaviour), "OnEnable")]
- static class PostProcessingBehaviour_OnEnable_Patch
- {
-
- static void Prefix(PostProcessingBehaviour __instance)
- {
- if(__instance.profile != null && !defaultPostProcessingSet)
- {
- defaultVignetteSettings = __instance.profile.vignette.settings;
- defaultBloomSettings = __instance.profile.bloom.settings;
- defaultPostProcessingSet = true;
- }
- else
- {
- defaultVignetteSettings = VignetteModel.Settings.defaultSettings;
- defaultBloomSettings = BloomModel.Settings.defaultSettings;
- }
- }
- }
-
- [HarmonyPatch(typeof(PostProcessingBehaviour), "OnPreCull")]
- static class PostProcessingBehaviour_OnPreCull_Patch
- {
- static void Postfix(PostProcessingBehaviour __instance, PostProcessingContext ___m_Context, ref VignetteComponent ___m_Vignette, ref BloomComponent ___m_Bloom)
- {
- PostProcessingContext postProcessingContext = ___m_Context;
-
- if (enabled && settings.customVignette)
- {
-
- VignetteModel.Settings vSettings = new VignetteModel.Settings
- {
- mode = VignetteModel.Mode.Classic,
- intensity = settings.vignetteIntensity,
- color = new Color(settings.vignetteColorRed, settings.vignetteColorGreen, settings.vignetteColorBlue, settings.vignetteColorAlpha),
- center = new Vector2(settings.vignetteX,settings.vignetteY),
- smoothness = settings.vignetteSmoothness,
- roundness = settings.vignetteRoundness,
- rounded = settings.vignetteRounded
- };
- ___m_Vignette.model.settings = vSettings;
- }
- else
- {
- ___m_Vignette.model.settings = defaultVignetteSettings;
- }
-
- if (enabled && settings.customBloom)
- {
- BloomModel.BloomSettings bbSettings = new BloomModel.BloomSettings
- {
- intensity = settings.bloomIntensity,
- threshold = settings.bloomThreshold,
- softKnee = settings.bloomSoftKnee,
- radius = settings.bloomRadius,
- antiFlicker = settings.bloomAntiFlicker
- };
-
- BloomModel.LensDirtSettings blSettings = new BloomModel.LensDirtSettings
- {
- texture = ___m_Bloom.model.settings.lensDirt.texture,
- intensity = settings.bloomLensDirtIntensity
- };
- BloomModel.Settings bSettings = new BloomModel.Settings
- {
- bloom = bbSettings,
- lensDirt = blSettings
- };
-
- ___m_Bloom.model.settings = bSettings;
- }
- else
- {
- ___m_Bloom.model.settings = defaultBloomSettings;
- }
- }
- }
}
}
diff --git a/Environment/Settings.cs b/Environment/Settings.cs
index 170330d..fe34963 100644
--- a/Environment/Settings.cs
+++ b/Environment/Settings.cs
@@ -484,6 +484,9 @@ public class Settings : UnityModManager.ModSettings
public bool customVignette = false;
public bool customBloom = false;
+ public bool customEyeAdapt = false;
+ public bool customMotionBlur = false;
+ public bool customColorGrading = false;
public float vignetteColorRed = 0f;
public float vignetteColorGreen = 0f;
@@ -504,6 +507,43 @@ public class Settings : UnityModManager.ModSettings
public bool bloomAntiFlicker = false;
public float bloomLensDirtIntensity = 3f;
+ public float eyeAdaptLowPercent = 45f;
+ public float eyeAdaptHighPercent = 95f;
+ public float eyeAdaptMinLuminance = -5f;
+ public float eyeAdaptMaxLuminance = 1f;
+ public float eyeAdaptKeyValue = 0.25f;
+ public bool eyeAdaptDynamicKeyValue = true;
+ public bool eyeAdaptAdaptationFixed = false;
+ public float eyeAdaptSpeedUp = 2f;
+ public float eyeAdaptSpeedDown = 1f;
+ public int eyeAdaptLogMin = -8;
+ public int eyeAdaptLogMax = 4;
+
+ public float motionBlurShutterAngle = 270f;
+ public int motionBlurSampleCount = 10;
+ public float motionBlurFrameBlending = 0f;
+
+ public float depthOfFieldFocusDistance = 10f;
+ public float depthOfFieldAperture = 5.6f;
+ public float depthOfFieldFocalLength = 50f;
+ public bool depthOfFieldUseCameraFov = false;
+ public int depthOfFieldKernelSize = 1;
+
+ public int colorGradingTonemapper = 2;
+ public float colorGradingNeutralBlackIn = 0.02f;
+ public float colorGradingNeutralWhiteIn = 10f;
+ public float colorGradingNeutralBlackOut = 0f;
+ public float colorGradingNeutralWhiteOut = 10f;
+ public float colorGradingNeutralWhiteLevel = 5.3f;
+ public float colorGradingNeutralWhiteClip = 10f;
+
+ public float colorGradingPostExposure = 0f;
+ public float colorGradingTemperature = 0f;
+ public float colorGradingTint = 0f;
+ public float colorGradingHueShift = 0f;
+ public float colorGradingSaturation = 1f;
+ public float colorGradingContrast = 1f;
+
public string ToggleKey = "page up";
public override void Save(UnityModManager.ModEntry modEntry)
diff --git a/PortiaMods.sln b/PortiaMods.sln
index eaac40c..a7401e0 100644
--- a/PortiaMods.sln
+++ b/PortiaMods.sln
@@ -79,6 +79,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomMerch", "CustomMerch\
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenDungeons", "OpenDungeons\OpenDungeons.csproj", "{EE0D6BD7-1FA5-46E5-AF10-E4225E88BE3A}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PostProcessing", "PostProcessing\PostProcessing.csproj", "{5AD3331E-8F85-4E91-96F0-C65972137ADA}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -237,6 +239,10 @@ Global
{EE0D6BD7-1FA5-46E5-AF10-E4225E88BE3A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EE0D6BD7-1FA5-46E5-AF10-E4225E88BE3A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EE0D6BD7-1FA5-46E5-AF10-E4225E88BE3A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {5AD3331E-8F85-4E91-96F0-C65972137ADA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {5AD3331E-8F85-4E91-96F0-C65972137ADA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {5AD3331E-8F85-4E91-96F0-C65972137ADA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {5AD3331E-8F85-4E91-96F0-C65972137ADA}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/PostProcessing/Main.cs b/PostProcessing/Main.cs
new file mode 100644
index 0000000..b2baab6
--- /dev/null
+++ b/PostProcessing/Main.cs
@@ -0,0 +1,454 @@
+using Harmony12;
+using NovaEnv;
+using Pathea.WeatherNs;
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using UnityEngine;
+using UnityEngine.SceneManagement;
+using UnityModManagerNet;
+
+namespace PostProcessing
+{
+ public static partial class Main
+ {
+ private static Settings settings;
+ private static bool enabled;
+ private static bool isDebug = false;
+ private static float labelWidth = 80f;
+ private static float indentSpace = 30f;
+ private static string[] toneMappers = new string[] {
+ "None",
+ "ACES",
+ "Neutral"
+ };
+
+ private static string[] kernelSizes = new string[] {
+ "Small",
+ "Medium",
+ "Large",
+ "Very Large"
+ };
+
+ public static void Dbgl(string str = "", bool pref = true)
+ {
+ if (isDebug)
+ UnityEngine.Debug.Log((pref ? "Post Processing " : "") + str);
+ }
+ private static void Load(UnityModManager.ModEntry modEntry)
+ {
+ settings = Settings.Load(modEntry);
+
+ modEntry.OnToggle = OnToggle;
+ modEntry.OnGUI = OnGUI;
+ modEntry.OnSaveGUI = OnSaveGUI;
+
+ modEntry.OnUpdate = OnUpdate;
+
+ var harmony = HarmonyInstance.Create(modEntry.Info.Id);
+ harmony.PatchAll(Assembly.GetExecutingAssembly());
+
+ }
+
+ static void OnUpdate(UnityModManager.ModEntry modEntry, float dt)
+ {
+ if (Input.GetKeyDown(settings.ToggleKey))
+ {
+ modEntry.OnToggle(modEntry, !enabled);
+ }
+ }
+
+ private static void OnSaveGUI(UnityModManager.ModEntry modEntry)
+ {
+ settings.Save(modEntry);
+ }
+
+ private static void OnGUI(UnityModManager.ModEntry modEntry)
+ {
+ GUILayout.BeginHorizontal();
+ GUILayout.Label(string.Format("Toggle Hotkey:"), new GUILayoutOption[] { GUILayout.Width(labelWidth * 2) });
+ settings.ToggleKey = GUILayout.TextField(settings.ToggleKey, new GUILayoutOption[] { GUILayout.Width(labelWidth * 2) });
+ GUILayout.EndHorizontal();
+ GUILayout.Space(20f);
+
+ GUILayout.BeginHorizontal();
+ GUILayout.Space(indentSpace);
+ GUILayout.BeginVertical();
+ settings.customVignette = GUILayout.Toggle(settings.customVignette, $"Use Custom Vignette", new GUILayoutOption[0]);
+ if (settings.customVignette)
+ {
+ GUILayout.Space(10f);
+ GUILayout.BeginHorizontal();
+ GUILayout.Space(indentSpace);
+ GUILayout.BeginVertical();
+
+ GUILayout.Label("Color", new GUILayoutOption[0]);
+
+ GUILayout.BeginHorizontal();
+ GUILayout.Space(indentSpace);
+ GUILayout.BeginVertical();
+
+ GUILayout.Label(string.Format("Red: {0:F2} ", settings.vignetteColorRed), new GUILayoutOption[] { GUILayout.Width(labelWidth) });
+ settings.vignetteColorRed = GUILayout.HorizontalSlider((float)settings.vignetteColorRed * 100f, 0, 100f) / 100f;
+ GUILayout.Label(string.Format("Green: {0:F2} ", settings.vignetteColorRed), new GUILayoutOption[] { GUILayout.Width(labelWidth) });
+ settings.vignetteColorGreen = GUILayout.HorizontalSlider((float)settings.vignetteColorGreen * 100f, 0, 100f) / 100f;
+ GUILayout.Label(string.Format("Blue: {0:F2} ", settings.vignetteColorBlue), new GUILayoutOption[] { GUILayout.Width(labelWidth) });
+ settings.vignetteColorBlue = GUILayout.HorizontalSlider((float)settings.vignetteColorBlue * 100f, 0, 100f) / 100f;
+ GUILayout.Label(string.Format("Alpha: {0:F2} ", settings.vignetteColorAlpha), new GUILayoutOption[] { GUILayout.Width(labelWidth) });
+ settings.vignetteColorAlpha = GUILayout.HorizontalSlider((float)settings.vignetteColorAlpha * 100f, 0, 100f) / 100f;
+ GUILayout.EndVertical();
+ GUILayout.EndHorizontal();
+
+ GUILayout.Space(10f);
+
+
+ GUILayout.Label("Center", new GUILayoutOption[0]);
+
+ GUILayout.BeginHorizontal();
+ GUILayout.Space(indentSpace);
+ GUILayout.BeginVertical();
+
+ GUILayout.Label(string.Format("X: {0:F2} ", settings.vignetteX), new GUILayoutOption[] { GUILayout.Width(labelWidth) });
+ settings.vignetteX = GUILayout.HorizontalSlider((float)settings.vignetteX * 100f, 0, 100f) / 100f;
+ GUILayout.Label(string.Format("Y: {0:F2} ", settings.vignetteY), new GUILayoutOption[] { GUILayout.Width(labelWidth) });
+ settings.vignetteY = GUILayout.HorizontalSlider((float)settings.vignetteY * 100f, 0, 100f) / 100f;
+ GUILayout.EndVertical();
+ GUILayout.EndHorizontal();
+
+
+ GUILayout.Space(10f);
+
+ GUILayout.Label(string.Format("Intensity {0:F2} ", settings.vignetteIntensity), new GUILayoutOption[0]);
+ settings.vignetteIntensity = GUILayout.HorizontalSlider((float)settings.vignetteIntensity * 100f, 0, 100f) / 100f;
+
+ GUILayout.Space(10f);
+
+
+ GUILayout.Label(string.Format("Smoothness {0:F2} ", settings.vignetteSmoothness), new GUILayoutOption[0]);
+ settings.vignetteSmoothness = GUILayout.HorizontalSlider((float)settings.vignetteSmoothness * 100f, 1, 100f) / 100f;
+
+ GUILayout.Space(10f);
+
+
+ GUILayout.Label(string.Format("Roundness {0:F2} ", settings.vignetteRoundness), new GUILayoutOption[0]);
+ settings.vignetteRoundness = GUILayout.HorizontalSlider((float)settings.vignetteRoundness * 100f, 0, 100f) / 100f;
+
+ GUILayout.Space(10f);
+
+ settings.vignetteRounded = GUILayout.Toggle(settings.vignetteRounded, "Force Round Vignette", new GUILayoutOption[0]);
+
+ GUILayout.EndVertical();
+ GUILayout.EndHorizontal();
+
+ }
+ GUILayout.Space(10f);
+ settings.customBloom = GUILayout.Toggle(settings.customBloom, "Use Custom Bloom", new GUILayoutOption[0]);
+ if (settings.customBloom)
+ {
+ GUILayout.Space(10f);
+ GUILayout.BeginHorizontal();
+ GUILayout.Space(indentSpace);
+ GUILayout.BeginVertical();
+
+ GUILayout.Label(new GUIContent(string.Format("Intensity {0:F2} ", settings.bloomIntensity), "Strength of the bloom filter."), new GUILayoutOption[0]);
+ settings.bloomIntensity = GUILayout.HorizontalSlider((float)settings.bloomIntensity * 100f, 0, 1000f) / 100f;
+
+ GUILayout.Space(10f);
+
+
+ GUILayout.Label(new GUIContent(string.Format("Threshold {0:F2} ", settings.bloomThreshold), "Filters out pixels under this level of brightness."), new GUILayoutOption[0]);
+ settings.bloomThreshold = GUILayout.HorizontalSlider((float)settings.bloomThreshold * 100f, 0, 1000f) / 100f;
+
+ GUILayout.Space(10f);
+
+
+ GUILayout.Label(new GUIContent(string.Format("Soft Knee {0:F2} ", settings.bloomSoftKnee), "Makes transition between under/over-threshold gradual (0 = hard threshold, 1 = soft threshold)."), new GUILayoutOption[0]);
+ settings.bloomSoftKnee = GUILayout.HorizontalSlider((float)settings.bloomSoftKnee * 100f, 0, 100f) / 100f;
+
+ GUILayout.Space(10f);
+
+
+ GUILayout.Label(new GUIContent(string.Format("Radius {0:F2} ", settings.bloomRadius), "Changes extent of veiling effects in a screen resolution-independent fashion."), new GUILayoutOption[0]);
+ settings.bloomRadius = GUILayout.HorizontalSlider((float)settings.bloomRadius * 10f, 10, 70f) / 10f;
+
+ GUILayout.Space(10f);
+
+
+ GUILayout.Label(new GUIContent(string.Format("Lens Dirt Intensity {0:F2} ", settings.bloomLensDirtIntensity), "Amount of lens dirtiness."), new GUILayoutOption[0]);
+ settings.bloomLensDirtIntensity = GUILayout.HorizontalSlider((float)settings.bloomLensDirtIntensity * 100f, 0, 1000f) / 100f;
+
+ GUILayout.Space(10f);
+
+
+ settings.bloomAntiFlicker = GUILayout.Toggle(settings.bloomAntiFlicker, new GUIContent("Anti-flicker", "Reduces flashing noise with an additional filter."), new GUILayoutOption[0]);
+
+ GUILayout.Space(10f);
+ GUILayout.EndVertical();
+ GUILayout.EndHorizontal();
+
+ }
+ GUILayout.Space(10f);
+
+
+ settings.customEyeAdapt = GUILayout.Toggle(settings.customEyeAdapt, "Use Custom Eye Adaptation", new GUILayoutOption[0]);
+ if (settings.customEyeAdapt)
+ {
+ GUILayout.Space(10f);
+ GUILayout.BeginHorizontal();
+ GUILayout.Space(indentSpace);
+ GUILayout.BeginVertical();
+
+ GUILayout.Label(new GUIContent(string.Format("Low Percent {0:F0} ", settings.eyeAdaptLowPercent), "Filters the dark part of the histogram when computing the average luminance to avoid very dark pixels from contributing to the auto exposure. Unit is in percent."), new GUILayoutOption[0]);
+ settings.eyeAdaptLowPercent = GUILayout.HorizontalSlider((float)settings.eyeAdaptLowPercent, 1f, 99f);
+
+ GUILayout.Space(10f);
+
+
+ GUILayout.Label(new GUIContent(string.Format("High Percent {0:F0} ", settings.eyeAdaptHighPercent), "Filters the bright part of the histogram when computing the average luminance to avoid very dark pixels from contributing to the auto exposure. Unit is in percent."), new GUILayoutOption[0]);
+ settings.eyeAdaptHighPercent = GUILayout.HorizontalSlider((float)settings.eyeAdaptHighPercent, 1f, 99f);
+
+ GUILayout.Space(10f);
+
+
+ GUILayout.Label(new GUIContent(string.Format("Min Avg Luminance for AE{0:F2} ", settings.eyeAdaptMinLuminance), "Minimum average luminance to consider for auto exposure (in EV)."), new GUILayoutOption[0]);
+ settings.eyeAdaptMinLuminance = GUILayout.HorizontalSlider((float)settings.eyeAdaptMinLuminance * 100f, -600, 2100f) / 100f;
+
+ GUILayout.Space(10f);
+
+
+ GUILayout.Label(new GUIContent(string.Format("Max Avg Luminance for AE{0:F2} ", settings.eyeAdaptMaxLuminance), "Maximum average luminance to consider for auto exposure (in EV)."), new GUILayoutOption[0]);
+ settings.eyeAdaptMaxLuminance = GUILayout.HorizontalSlider((float)settings.eyeAdaptMaxLuminance * 100f, -600, 2100f) / 100f;
+
+ GUILayout.Space(10f);
+
+
+ GUILayout.Label(new GUIContent(string.Format("Exposure Bias{0:F2} ", settings.eyeAdaptKeyValue), "Exposure bias. Use this to offset the global exposure of the scene."), new GUILayoutOption[0]);
+ settings.eyeAdaptKeyValue = GUILayout.HorizontalSlider((float)settings.eyeAdaptKeyValue * 100f, 0, 100f) / 100f;
+
+ GUILayout.Space(10f);
+
+
+ settings.eyeAdaptDynamicKeyValue = GUILayout.Toggle(settings.eyeAdaptDynamicKeyValue, new GUIContent("Dynamic Key Value", "Turn this on to let Unity handle the key value automatically based on average luminance."), new GUILayoutOption[0]);
+
+ GUILayout.Space(10f);
+
+
+ settings.eyeAdaptAdaptationFixed = GUILayout.Toggle(settings.eyeAdaptAdaptationFixed, new GUIContent("Fixed Eye Adaptation", "Turn off if you want the auto exposure to be animated."), new GUILayoutOption[0]);
+
+ GUILayout.Space(10f);
+
+
+ GUILayout.Label(new GUIContent(string.Format("Dark-to-light Adaptation Speed {0:F2} ", settings.eyeAdaptSpeedUp), "Adaptation speed from a dark to a light environment."), new GUILayoutOption[0]);
+ settings.eyeAdaptSpeedUp = GUILayout.HorizontalSlider((float)settings.eyeAdaptSpeedUp * 100f, 0, 1000f) / 100f;
+
+ GUILayout.Space(10f);
+
+
+ GUILayout.Label(new GUIContent(string.Format("Light-to-dark Adaptation Speed {0:F2} ", settings.eyeAdaptSpeedDown), "Adaptation speed from a light to a dark environment."), new GUILayoutOption[0]);
+ settings.eyeAdaptSpeedDown = GUILayout.HorizontalSlider((float)settings.eyeAdaptSpeedDown * 100f, 0, 1000f) / 100f;
+
+ GUILayout.Space(10f);
+
+
+ GUILayout.Label(new GUIContent(string.Format("Brightness Range Min{0} ", settings.eyeAdaptLogMin), "Lower bound for the brightness range of the generated histogram (in EV). The bigger the spread between min & max, the lower the precision will be."), new GUILayoutOption[0]);
+ settings.eyeAdaptLogMin = (int)GUILayout.HorizontalSlider((float)settings.eyeAdaptLogMin, -16f, -1f);
+
+ GUILayout.Space(10f);
+
+
+ GUILayout.Label(new GUIContent(string.Format("Brightness Range Max{0} ", settings.eyeAdaptLogMax), "Upper bound for the brightness range of the generated histogram (in EV). The bigger the spread between min & max, the lower the precision will be."), new GUILayoutOption[0]);
+ settings.eyeAdaptLogMax = (int)GUILayout.HorizontalSlider((float)settings.eyeAdaptLogMax, 1f, 16f);
+
+ GUILayout.Space(10f);
+
+
+ GUILayout.EndVertical();
+ GUILayout.EndHorizontal();
+
+ }
+
+ GUILayout.Space(10f);
+
+ settings.customMotionBlur = GUILayout.Toggle(settings.customMotionBlur, "Use Custom Motion Blur", new GUILayoutOption[0]);
+ if (settings.customMotionBlur)
+ {
+ GUILayout.Space(10f);
+ GUILayout.BeginHorizontal();
+ GUILayout.Space(indentSpace);
+ GUILayout.BeginVertical();
+
+ GUILayout.Label(new GUIContent(string.Format("Shutter Angle {0:F0} ", settings.motionBlurShutterAngle), "The angle of rotary shutter. Larger values give longer exposure."), new GUILayoutOption[0]);
+ settings.motionBlurShutterAngle = GUILayout.HorizontalSlider((float)settings.motionBlurShutterAngle, 0f, 360f);
+
+ GUILayout.Space(10f);
+
+
+ GUILayout.Label(new GUIContent(string.Format("Sample Count {0} ", settings.eyeAdaptLogMin), "The amount of sample points, which affects quality and performances."), new GUILayoutOption[0]);
+ settings.eyeAdaptLogMin = (int)GUILayout.HorizontalSlider((float)settings.eyeAdaptLogMin, 4f, 32f);
+
+ GUILayout.Space(10f);
+
+
+ GUILayout.Label(new GUIContent(string.Format("Frame Blending {0:F2} ", settings.motionBlurFrameBlending), "The strength of multiple frame blending. The opacity of preceding frames are determined from this coefficient and time differences."), new GUILayoutOption[0]);
+ settings.motionBlurFrameBlending = GUILayout.HorizontalSlider((float)settings.motionBlurFrameBlending * 100f, 0, 100f) / 100f;
+
+ GUILayout.Space(10f);
+
+
+ GUILayout.EndVertical();
+ GUILayout.EndHorizontal();
+
+ }
+
+ GUILayout.Space(10f);
+
+
+ settings.customDepthOfField = GUILayout.Toggle(settings.customDepthOfField, "Use Custom Depth of Field", new GUILayoutOption[0]);
+ if (settings.customDepthOfField)
+ {
+ GUILayout.Space(10f);
+ GUILayout.BeginHorizontal();
+ GUILayout.Space(indentSpace);
+ GUILayout.BeginVertical();
+
+ GUILayout.Label(new GUIContent(string.Format("Focus Distance {0:F2} ", settings.depthOfFieldFocusDistance), "Distance to the point of focus."), new GUILayoutOption[0]);
+ settings.depthOfFieldFocusDistance = GUILayout.HorizontalSlider((float)settings.depthOfFieldFocusDistance*100f, 10f, 1000f)/100f;
+
+ GUILayout.Space(10f);
+
+
+ GUILayout.Label(new GUIContent(string.Format("Aperature {0:F2} ", settings.depthOfFieldAperture), "Ratio of aperture (known as f-stop or f-number). The smaller the value is, the shallower the depth of field is."), new GUILayoutOption[0]);
+ settings.depthOfFieldAperture = GUILayout.HorizontalSlider((float)settings.depthOfFieldAperture * 100f, 5f, 3200f)/100f;
+
+ GUILayout.Space(10f);
+
+
+ GUILayout.Label(new GUIContent(string.Format("Focal Length {0:F0} ", settings.depthOfFieldFocalLength), "Distance between the lens and the film. The larger the value is, the shallower the depth of field is."), new GUILayoutOption[0]);
+ settings.depthOfFieldFocalLength = GUILayout.HorizontalSlider((float)settings.depthOfFieldFocalLength, 1f, 300f);
+
+ GUILayout.Space(10f);
+
+
+ settings.depthOfFieldUseCameraFov = GUILayout.Toggle(settings.depthOfFieldUseCameraFov, new GUIContent("Calculate the focal length automatically from the field-of-view value set on the camera. Using this setting isn't recommended."), new GUILayoutOption[0]);
+
+
+ GUILayout.Label(new GUIContent(string.Format("Kernel Size {0:F2} ", kernelSizes[settings.depthOfFieldKernelSize]), "Convolution kernel size of the bokeh filter, which determines the maximum radius of bokeh. It also affects the performance (the larger the kernel is, the longer the GPU time is required)."), new GUILayoutOption[0]);
+ settings.depthOfFieldKernelSize = (int)GUILayout.HorizontalSlider((float)settings.depthOfFieldKernelSize, 0f, 3f);
+
+ GUILayout.Space(10f);
+
+
+ GUILayout.EndVertical();
+ GUILayout.EndHorizontal();
+
+ }
+
+ GUILayout.Space(10f);
+
+
+ settings.customColorGrading = GUILayout.Toggle(settings.customColorGrading, "Use Custom Color Grading", new GUILayoutOption[0]);
+ if (settings.customColorGrading)
+ {
+ GUILayout.Space(10f);
+ GUILayout.BeginHorizontal();
+ GUILayout.Space(indentSpace);
+ GUILayout.BeginVertical();
+
+ GUILayout.Label(new GUIContent(string.Format("Tone Mapper {0} ", toneMappers[settings.colorGradingTonemapper]), "Tonemapping algorithm to use at the end of the color grading process. Use \"Neutral\" if you need a customizable tonemapper."), new GUILayoutOption[0]);
+ settings.colorGradingTonemapper = (int)GUILayout.HorizontalSlider((float)settings.colorGradingTonemapper, 0f, 2f);
+
+ GUILayout.Space(10f);
+
+
+ GUILayout.Label(new GUIContent(string.Format("Neutral Black In {0:F2} ", settings.colorGradingNeutralBlackIn), ""), new GUILayoutOption[0]);
+ settings.colorGradingNeutralBlackIn = GUILayout.HorizontalSlider((float)settings.colorGradingNeutralBlackIn * 100f, -10f, 10f) / 100f;
+
+ GUILayout.Space(10f);
+
+
+ GUILayout.Label(new GUIContent(string.Format("Neutral White In {0:F1} ", settings.colorGradingNeutralWhiteIn), ""), new GUILayoutOption[0]);
+ settings.colorGradingNeutralWhiteIn = GUILayout.HorizontalSlider((float)settings.colorGradingNeutralWhiteIn * 10f, 10, 200f) / 10f;
+
+ GUILayout.Space(10f);
+
+
+ GUILayout.Label(new GUIContent(string.Format("Neutral Black Out {0:F2} ", settings.colorGradingNeutralBlackOut), ""), new GUILayoutOption[0]);
+ settings.colorGradingNeutralBlackOut = GUILayout.HorizontalSlider((float)settings.colorGradingNeutralBlackOut * 100f, -9f, 10f) / 100f;
+
+ GUILayout.Space(10f);
+
+ GUILayout.Label(new GUIContent(string.Format("Neutral White Out {0:F1} ", settings.colorGradingNeutralWhiteOut), ""), new GUILayoutOption[0]);
+ settings.colorGradingNeutralWhiteOut = GUILayout.HorizontalSlider((float)settings.colorGradingNeutralWhiteOut * 10f, 10, 190f) / 10f;
+
+ GUILayout.Space(10f);
+
+
+ GUILayout.Label(new GUIContent(string.Format("Neutral White Level {0:F1} ", settings.colorGradingNeutralWhiteLevel), ""), new GUILayoutOption[0]);
+ settings.colorGradingNeutralWhiteLevel = GUILayout.HorizontalSlider((float)settings.colorGradingNeutralWhiteLevel * 10f, 1f, 200f) / 10f;
+
+ GUILayout.Space(10f);
+
+
+ GUILayout.Label(new GUIContent(string.Format("Neutral White Clip {0:F1} ", settings.colorGradingNeutralWhiteClip), ""), new GUILayoutOption[0]);
+ settings.colorGradingNeutralWhiteClip = GUILayout.HorizontalSlider((float)settings.colorGradingNeutralWhiteClip * 10f, 10f, 100f) / 10f;
+
+ GUILayout.Space(10f);
+
+
+ GUILayout.Label(new GUIContent(string.Format("Post Exposure {0:F2} ", settings.colorGradingPostExposure), "Adjusts the overall exposure of the scene in EV units. This is applied after HDR effect and right before tonemapping so it won't affect previous effects in the chain."), new GUILayoutOption[0]);
+ settings.colorGradingPostExposure = GUILayout.HorizontalSlider((float)settings.colorGradingPostExposure * 100f, -600, 2100f) / 100f;
+
+ GUILayout.Space(10f);
+
+
+ GUILayout.Label(new GUIContent(string.Format("Temperature {0:F1} ", settings.colorGradingTemperature), "Sets the white balance to a custom color temperature."), new GUILayoutOption[0]);
+ settings.colorGradingTemperature = GUILayout.HorizontalSlider((float)settings.colorGradingTemperature * 10f, -1000, 1000f) / 10f;
+
+ GUILayout.Space(10f);
+
+
+ GUILayout.Label(new GUIContent(string.Format("Tint {0:F1} ", settings.colorGradingTint), "Sets the white balance to compensate for a green or magenta tint."), new GUILayoutOption[0]);
+ settings.colorGradingTint = GUILayout.HorizontalSlider((float)settings.colorGradingTint * 10f, -1000f, 1000f) / 10f;
+
+ GUILayout.Space(10f);
+
+ GUILayout.Label(new GUIContent(string.Format("Hue Shift {0:F0} ", settings.colorGradingHueShift), ""), new GUILayoutOption[0]);
+ settings.colorGradingHueShift = GUILayout.HorizontalSlider((float)settings.colorGradingHueShift, -180f, 180f);
+
+ GUILayout.Space(10f);
+
+
+ GUILayout.Label(new GUIContent(string.Format("Saturation {0:F2} ", settings.colorGradingSaturation), "Pushes the intensity of all colors."), new GUILayoutOption[0]);
+ settings.colorGradingSaturation = GUILayout.HorizontalSlider((float)settings.colorGradingSaturation * 100f, 0f, 100f) / 100f;
+
+ GUILayout.Space(10f);
+
+
+ GUILayout.Label(new GUIContent(string.Format("Contrast {0:F2} ", settings.colorGradingContrast), "Expands or shrinks the overall range of tonal values."), new GUILayoutOption[0]);
+ settings.colorGradingContrast = GUILayout.HorizontalSlider((float)settings.colorGradingContrast * 100f, 0f, 100f) / 100f;
+
+ GUILayout.Space(10f);
+
+
+ GUILayout.EndVertical();
+ GUILayout.EndHorizontal();
+
+ }
+
+ GUILayout.Space(20f);
+
+ GUILayout.EndVertical();
+ GUILayout.EndHorizontal();
+
+ }
+
+
+ // Called when the mod is turned to on/off.
+ static bool OnToggle(UnityModManager.ModEntry modEntry, bool value /* active or inactive */)
+ {
+ enabled = value;
+ return true; // Permit or not.
+ }
+
+ }
+}
diff --git a/PostProcessing/Patches.cs b/PostProcessing/Patches.cs
new file mode 100644
index 0000000..b7b44c8
--- /dev/null
+++ b/PostProcessing/Patches.cs
@@ -0,0 +1,203 @@
+using Harmony12;
+using NovaEnv;
+using Pathea;
+using Pathea.WeatherNs;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.Design.Serialization;
+using System.Linq;
+using System.Reflection;
+using System.Security.Policy;
+using System.Text;
+using UnityEngine;
+using UnityEngine.PostProcessing;
+
+namespace PostProcessing
+{
+ static partial class Main
+ {
+
+
+ private static bool defaultPostProcessingSet = false;
+ private static VignetteModel.Settings defaultVignetteSettings;
+ private static BloomModel.Settings defaultBloomSettings;
+ private static EyeAdaptationModel.Settings defaultEyeAdaptSettings;
+ private static MotionBlurModel.Settings defaultMotionBlurSettings;
+ private static DepthOfFieldModel.Settings defaultDepthOfFieldSettings;
+ private static ColorGradingModel.Settings defaultColorGradingSettings;
+
+ [HarmonyPatch(typeof(PostProcessingBehaviour), "OnEnable")]
+ static class PostProcessingBehaviour_OnEnable_Patch
+ {
+
+ static void Prefix(PostProcessingBehaviour __instance)
+ {
+ if(__instance.profile != null && !defaultPostProcessingSet)
+ {
+ defaultVignetteSettings = __instance.profile.vignette.settings;
+ defaultBloomSettings = __instance.profile.bloom.settings;
+ defaultEyeAdaptSettings = __instance.profile.eyeAdaptation.settings;
+ defaultMotionBlurSettings = __instance.profile.motionBlur.settings;
+ defaultDepthOfFieldSettings = __instance.profile.depthOfField.settings;
+ defaultColorGradingSettings = __instance.profile.colorGrading.settings;
+ defaultPostProcessingSet = true;
+ }
+ }
+ }
+
+ [HarmonyPatch(typeof(PostProcessingBehaviour), "OnPreCull")]
+ static class PostProcessingBehaviour_OnPreCull_Patch
+ {
+ static void Postfix(PostProcessingBehaviour __instance, PostProcessingContext ___m_Context, ref VignetteComponent ___m_Vignette, ref BloomComponent ___m_Bloom, ref EyeAdaptationComponent ___m_EyeAdaptation, ref DepthOfFieldComponent ___m_DepthOfField, ref MotionBlurComponent ___m_MotionBlur, ref ColorGradingComponent ___m_ColorGrading)
+ {
+ PostProcessingContext postProcessingContext = ___m_Context;
+
+ if (enabled && settings.customVignette)
+ {
+
+ VignetteModel.Settings vSettings = new VignetteModel.Settings
+ {
+ mode = VignetteModel.Mode.Classic,
+ intensity = settings.vignetteIntensity,
+ color = new Color(settings.vignetteColorRed, settings.vignetteColorGreen, settings.vignetteColorBlue, settings.vignetteColorAlpha),
+ center = new Vector2(settings.vignetteX,settings.vignetteY),
+ smoothness = settings.vignetteSmoothness,
+ roundness = settings.vignetteRoundness,
+ rounded = settings.vignetteRounded
+ };
+ ___m_Vignette.model.settings = vSettings;
+ }
+ else
+ {
+ ___m_Vignette.model.settings = defaultVignetteSettings;
+ }
+
+ if (enabled && settings.customBloom)
+ {
+ BloomModel.BloomSettings bbSettings = new BloomModel.BloomSettings
+ {
+ intensity = settings.bloomIntensity,
+ threshold = settings.bloomThreshold,
+ softKnee = settings.bloomSoftKnee,
+ radius = settings.bloomRadius,
+ antiFlicker = settings.bloomAntiFlicker
+ };
+
+ BloomModel.LensDirtSettings blSettings = new BloomModel.LensDirtSettings
+ {
+ texture = ___m_Bloom.model.settings.lensDirt.texture,
+ intensity = settings.bloomLensDirtIntensity
+ };
+ BloomModel.Settings bSettings = new BloomModel.Settings
+ {
+ bloom = bbSettings,
+ lensDirt = blSettings
+ };
+
+ ___m_Bloom.model.settings = bSettings;
+ }
+ else
+ {
+ ___m_Bloom.model.settings = defaultBloomSettings;
+ }
+
+ if (enabled && settings.customEyeAdapt)
+ {
+ EyeAdaptationModel.Settings eSettings = new EyeAdaptationModel.Settings
+ {
+ lowPercent = settings.eyeAdaptLowPercent,
+ highPercent = settings.eyeAdaptHighPercent,
+ minLuminance = settings.eyeAdaptMinLuminance,
+ maxLuminance = settings.eyeAdaptMaxLuminance,
+ keyValue = settings.eyeAdaptKeyValue,
+ dynamicKeyValue = settings.eyeAdaptDynamicKeyValue,
+ adaptationType = settings.eyeAdaptAdaptationFixed?EyeAdaptationModel.EyeAdaptationType.Fixed: EyeAdaptationModel.EyeAdaptationType.Progressive,
+ speedUp = settings.eyeAdaptSpeedUp,
+ speedDown = settings.eyeAdaptSpeedDown,
+ logMin = settings.eyeAdaptLogMin,
+ logMax = settings.eyeAdaptLogMax,
+ };
+
+ ___m_EyeAdaptation.model.settings = eSettings;
+ }
+ else
+ {
+ ___m_EyeAdaptation.model.settings = defaultEyeAdaptSettings;
+ }
+
+ if (enabled && settings.customMotionBlur)
+ {
+ MotionBlurModel.Settings mSettings = new MotionBlurModel.Settings
+ {
+ shutterAngle = settings.motionBlurShutterAngle,
+ sampleCount = settings.motionBlurSampleCount,
+ frameBlending = settings.motionBlurFrameBlending
+ };
+
+ ___m_MotionBlur.model.settings = mSettings;
+ }
+ else
+ {
+ ___m_MotionBlur.model.settings = defaultMotionBlurSettings;
+ }
+
+ if (enabled && settings.customDepthOfField)
+ {
+ DepthOfFieldModel.Settings dSettings = new DepthOfFieldModel.Settings
+ {
+ focusDistance = settings.depthOfFieldFocusDistance,
+ aperture = settings.depthOfFieldAperture,
+ focalLength = settings.depthOfFieldFocalLength,
+ useCameraFov = settings.depthOfFieldUseCameraFov,
+ kernelSize = (DepthOfFieldModel.KernelSize)settings.depthOfFieldKernelSize,
+ };
+
+ ___m_DepthOfField.model.settings = dSettings;
+ }
+ else
+ {
+ ___m_DepthOfField.model.settings = defaultDepthOfFieldSettings;
+ }
+
+ if (enabled && settings.customColorGrading)
+ {
+ ColorGradingModel.TonemappingSettings ctSettings = new ColorGradingModel.TonemappingSettings
+ {
+ tonemapper = (ColorGradingModel.Tonemapper)settings.colorGradingTonemapper,
+ neutralBlackIn = settings.colorGradingNeutralBlackIn,
+ neutralWhiteIn = settings.colorGradingNeutralWhiteIn,
+ neutralBlackOut = settings.colorGradingNeutralBlackOut,
+ neutralWhiteOut = settings.colorGradingNeutralWhiteOut,
+ neutralWhiteLevel = settings.colorGradingNeutralWhiteLevel,
+ neutralWhiteClip = settings.colorGradingNeutralWhiteClip
+ };
+
+ ColorGradingModel.BasicSettings cbSettings = new ColorGradingModel.BasicSettings
+ {
+ postExposure = settings.colorGradingPostExposure,
+ temperature = settings.colorGradingTemperature,
+ tint = settings.colorGradingTint,
+ hueShift = settings.colorGradingHueShift,
+ saturation = settings.colorGradingSaturation,
+ contrast = settings.colorGradingContrast
+ };
+
+ ColorGradingModel.Settings cSettings = new ColorGradingModel.Settings
+ {
+ tonemapping = ctSettings,
+ basic = cbSettings,
+ channelMixer = ___m_ColorGrading.model.settings.channelMixer,
+ colorWheels = ___m_ColorGrading.model.settings.colorWheels,
+ curves = ___m_ColorGrading.model.settings.curves
+ };
+
+ ___m_ColorGrading.model.settings = cSettings;
+ }
+ else
+ {
+ ___m_ColorGrading.model.settings = defaultColorGradingSettings;
+ }
+ }
+ }
+ }
+}
diff --git a/PostProcessing/PostProcessing.csproj b/PostProcessing/PostProcessing.csproj
new file mode 100644
index 0000000..85d11b9
--- /dev/null
+++ b/PostProcessing/PostProcessing.csproj
@@ -0,0 +1,96 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {5AD3331E-8F85-4E91-96F0-C65972137ADA}
+ Library
+ Properties
+ PostProcessing
+ PostProcessing
+ v3.5
+ 512
+ true
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ H:\tmp\ga\MTAP\Portia_Data\Managed\UnityModManager\0Harmony12.dll
+
+
+ H:\tmp\ga\MTAP\Portia_Data\Managed\Assembly-CSharp.dll
+
+
+ H:\tmp\ga\MTAP\Portia_Data\Managed\Assembly-CSharp-firstpass.dll
+
+
+
+
+
+
+
+
+ H:\tmp\ga\MTAP\Portia_Data\Managed\UnityEngine.dll
+
+
+ H:\tmp\ga\MTAP\Portia_Data\Managed\UnityEngine.AnimationModule.dll
+
+
+ H:\tmp\ga\MTAP\Portia_Data\Managed\UnityEngine.AudioModule.dll
+
+
+ H:\tmp\ga\MTAP\Portia_Data\Managed\UnityEngine.CoreModule.dll
+
+
+ H:\tmp\ga\MTAP\Portia_Data\Managed\UnityEngine.IMGUIModule.dll
+
+
+ H:\tmp\ga\MTAP\Portia_Data\Managed\UnityEngine.ParticleSystemModule.dll
+
+
+ H:\tmp\ga\MTAP\Portia_Data\Managed\UnityEngine.UI.dll
+
+
+ H:\tmp\ga\MTAP\Portia_Data\Managed\UnityEngine.UIModule.dll
+
+
+ H:\tmp\ga\MTAP\Portia_Data\Managed\UnityEngine.UnityWebRequestAudioModule.dll
+
+
+ H:\tmp\ga\MTAP\Portia_Data\Managed\UnityEngine.UnityWebRequestModule.dll
+
+
+ H:\tmp\ga\MTAP\Portia_Data\Managed\UnityEngine.UnityWebRequestWWWModule.dll
+
+
+ H:\tmp\ga\MTAP\Portia_Data\Managed\UnityModManager\UnityModManager.dll
+
+
+
+
+
+
+
+
+
+
+ call $(SolutionDir)copyDll.bat PostProcessing
+
+
\ No newline at end of file
diff --git a/PostProcessing/Settings.cs b/PostProcessing/Settings.cs
new file mode 100644
index 0000000..55af8bb
--- /dev/null
+++ b/PostProcessing/Settings.cs
@@ -0,0 +1,77 @@
+using UnityModManagerNet;
+namespace PostProcessing
+{
+ public class Settings : UnityModManager.ModSettings
+ {
+
+ public bool customVignette = false;
+ public bool customBloom = false;
+ public bool customEyeAdapt = false;
+ public bool customMotionBlur = false;
+ public bool customColorGrading = false;
+ public bool customDepthOfField = false;
+
+ public float vignetteColorRed = 0f;
+ public float vignetteColorGreen = 0f;
+ public float vignetteColorBlue = 0f;
+ public float vignetteColorAlpha = 0f;
+
+ public float vignetteIntensity = 0f;
+ public float vignetteX = 0.5f;
+ public float vignetteY = 0.5f;
+ public float vignetteSmoothness = 1f;
+ public float vignetteRoundness = 0f;
+ public bool vignetteRounded = false;
+
+ public float bloomIntensity = 0.5f;
+ public float bloomThreshold = 1.1f;
+ public float bloomSoftKnee = 0.5f;
+ public float bloomRadius = 4f;
+ public bool bloomAntiFlicker = false;
+ public float bloomLensDirtIntensity = 3f;
+
+ public float eyeAdaptLowPercent = 45f;
+ public float eyeAdaptHighPercent = 95f;
+ public float eyeAdaptMinLuminance = -5f;
+ public float eyeAdaptMaxLuminance = 1f;
+ public float eyeAdaptKeyValue = 0.25f;
+ public bool eyeAdaptDynamicKeyValue = true;
+ public bool eyeAdaptAdaptationFixed = false;
+ public float eyeAdaptSpeedUp = 2f;
+ public float eyeAdaptSpeedDown = 1f;
+ public int eyeAdaptLogMin = -8;
+ public int eyeAdaptLogMax = 4;
+
+ public float motionBlurShutterAngle = 270f;
+ public int motionBlurSampleCount = 10;
+ public float motionBlurFrameBlending = 0f;
+
+ public float depthOfFieldFocusDistance = 10f;
+ public float depthOfFieldAperture = 5.6f;
+ public float depthOfFieldFocalLength = 50f;
+ public bool depthOfFieldUseCameraFov = false;
+ public int depthOfFieldKernelSize = 1;
+
+ public int colorGradingTonemapper = 2;
+ public float colorGradingNeutralBlackIn = 0.02f;
+ public float colorGradingNeutralWhiteIn = 10f;
+ public float colorGradingNeutralBlackOut = 0f;
+ public float colorGradingNeutralWhiteOut = 10f;
+ public float colorGradingNeutralWhiteLevel = 5.3f;
+ public float colorGradingNeutralWhiteClip = 10f;
+
+ public float colorGradingPostExposure = 0f;
+ public float colorGradingTemperature = 0f;
+ public float colorGradingTint = 0f;
+ public float colorGradingHueShift = 0f;
+ public float colorGradingSaturation = 1f;
+ public float colorGradingContrast = 1f;
+
+ public string ToggleKey = "page down";
+
+ public override void Save(UnityModManager.ModEntry modEntry)
+ {
+ Save(this, modEntry);
+ }
+ }
+}
\ No newline at end of file
diff --git a/repository.json b/repository.json
index 61f675c..790858f 100644
--- a/repository.json
+++ b/repository.json
@@ -9,7 +9,7 @@
{"Id": "CustomTextures", "Version": "0.5.0"},
{"Id": "DeeDeeAnywhere", "Version": "0.1.3"},
{"Id": "DialogueEdit", "Version": "0.1.0"},
- {"Id": "Environment", "Version": "0.3.2"},
+ {"Id": "Environment", "Version": "0.3.3"},
{"Id": "FasterPiggy", "Version": "0.1.0"},
{"Id": "FishBowlMod", "Version": "0.3.2"},
{"Id": "InfiniteLevels", "Version": "0.1.0"},
@@ -25,6 +25,7 @@
{"Id": "MusicBox", "Version": "0.4.0"},
{"Id": "NoWiggle", "Version": "0.1.0"},
{"Id": "PennyComeBack", "Version": "0.1.0"},
+ {"Id": "PostProcessing", "Version": "0.1.0"},
{"Id": "SaveAnyTime", "Version": "0.8.5"},
{"Id": "StorageAnywhere", "Version": "0.6.0"},
{"Id": "Teleport", "Version": "0.0.1"},