diff --git a/NewHorizons/Builder/Atmosphere/AtmosphereBuilder.cs b/NewHorizons/Builder/Atmosphere/AtmosphereBuilder.cs
index 4bd2443e..1a833182 100644
--- a/NewHorizons/Builder/Atmosphere/AtmosphereBuilder.cs
+++ b/NewHorizons/Builder/Atmosphere/AtmosphereBuilder.cs
@@ -9,6 +9,7 @@ namespace NewHorizons.Builder.Atmosphere
private static readonly int InnerRadius = Shader.PropertyToID("_InnerRadius");
private static readonly int OuterRadius = Shader.PropertyToID("_OuterRadius");
private static readonly int SkyColor = Shader.PropertyToID("_SkyColor");
+ private static readonly int SunIntensity = Shader.PropertyToID("_SunIntensity");
public static readonly List<(GameObject, Material)> Skys = new();
@@ -41,7 +42,16 @@ namespace NewHorizons.Builder.Atmosphere
atmo.SetActive(true);
- Skys.Add((planetGO, material));
+ if (atmosphereModule.atmosphereSunIntensity == 0)
+ {
+ // do it based on distance
+ Skys.Add((planetGO, material));
+ }
+ else
+ {
+ // use the override instead
+ material.SetFloat(SunIntensity, atmosphereModule.atmosphereSunIntensity);
+ }
}
atmoGO.transform.position = planetGO.transform.TransformPoint(Vector3.zero);
diff --git a/NewHorizons/External/Modules/AtmosphereModule.cs b/NewHorizons/External/Modules/AtmosphereModule.cs
index 5c3167bd..b8638225 100644
--- a/NewHorizons/External/Modules/AtmosphereModule.cs
+++ b/NewHorizons/External/Modules/AtmosphereModule.cs
@@ -40,6 +40,15 @@ namespace NewHorizons.External.Modules
///
public MColor atmosphereTint;
+ ///
+ /// How intense should the sun appear in the sky.
+ /// Also affects general atmosphere brightness.
+ /// Default value of 1 matches Timber Hearth.
+ /// If not set, this will be determined based off the distance to the sun.
+ ///
+ [Range(0f, double.MaxValue)]
+ public float atmosphereSunIntensity;
+
///
/// Describes the clouds in the atmosphere
///