mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Merge branch 'dev' of https://github.com/xen-42/outer-wilds-new-horizons into eye-of-the-universe
This commit is contained in:
commit
e8e4945590
@ -177,6 +177,7 @@ namespace NewHorizons.Builder.Body
|
||||
if (config.fogTint != null)
|
||||
{
|
||||
var color = config.fogTint.ToColor();
|
||||
color.a = 1f;
|
||||
fog.fogTint = color;
|
||||
outerFogWarpVolume._fogColor = color;
|
||||
}
|
||||
|
||||
@ -255,6 +255,7 @@ namespace NewHorizons.Builder.Props
|
||||
Color fogTint, farFogTint, fogLightTint, lightTint, lightShaftTint, glowTint, fogOverrideTint;
|
||||
|
||||
farFogTint = config.fogTint != null ? config.fogTint.ToColor() : new Color(1f, 0.9608f, 0.851f, 1f);
|
||||
farFogTint.a = 1f;
|
||||
lightTint = config.lightTint != null ? config.lightTint.ToColor() : Color.white;
|
||||
|
||||
Color.RGBToHSV(farFogTint, out var fogH, out var fogS, out var fogV);
|
||||
@ -298,6 +299,16 @@ namespace NewHorizons.Builder.Props
|
||||
Color.RGBToHSV(lightShaftTint, out var shaftH, out var shaftS, out var shaftV);
|
||||
glowTint = Color.HSVToRGB(shaftH, shaftS, dimV * 1.25f);
|
||||
glowTint.a = lightTint.a;
|
||||
|
||||
// Scale glow shader properties, here due to dependencies
|
||||
var glow = brambleNode.FindChild("Effects/InnerWarpFogGlow");
|
||||
var glowMaterial = glow.GetComponent<MeshRenderer>().material;
|
||||
var limit = outerFogWarpVolume?._exitRadius ?? float.PositiveInfinity;
|
||||
glowMaterial.SetFloat("_NearFadeStart", 100f * config.scale);
|
||||
glowMaterial.SetFloat("_NearFadeEnd", Mathf.Min(limit, 500f * config.scale * Mathf.Max(glowTint.a, 0.5f)));
|
||||
glowMaterial.SetFloat("_FarFadeStart", Mathf.Min(limit, 500f * config.scale * Mathf.Max(glowTint.a, 0.5f)));
|
||||
glowMaterial.SetFloat("_FarFadeEnd", Mathf.Min(limit * 1.1f, 1000f * config.scale * Mathf.Max(glowTint.a, 0.5f)));
|
||||
|
||||
fogOverrideTint = Color.HSVToRGB(fogH, Mathf.Lerp(fogS, dimS, 0.5f), Mathf.Lerp(fogV, dimV, 0.5f));
|
||||
fogOverrideTint.a = 1f;
|
||||
}
|
||||
|
||||
@ -28,7 +28,8 @@ namespace NewHorizons.External.Modules
|
||||
public class BrambleDimensionInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The color of the fog inside this dimension. Leave blank for the default yellowish color: (113, 107, 81)
|
||||
/// The color of the fog inside this dimension.
|
||||
/// Leave blank for the default grayish color: (84, 83, 73)
|
||||
/// </summary>
|
||||
public MColor fogTint;
|
||||
|
||||
@ -43,7 +44,8 @@ namespace NewHorizons.External.Modules
|
||||
public string linksTo;
|
||||
|
||||
/// <summary>
|
||||
/// The internal radius (in meters) of the dimension. The default is 750 for the Hub, Escape Pod, and Angler Nest dimensions, and 500 for the others.
|
||||
/// The internal radius (in meters) of the dimension.
|
||||
/// The default is 750 for the Hub, Escape Pod, and Angler Nest dimensions, and 500 for the others.
|
||||
/// </summary>
|
||||
[DefaultValue(750f)] public float radius = 750f;
|
||||
|
||||
|
||||
@ -533,7 +533,7 @@
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"fogTint": {
|
||||
"description": "The color of the fog inside this dimension. Leave blank for the default yellowish color: (113, 107, 81)",
|
||||
"description": "The color of the fog inside this dimension. \nLeave blank for the default grayish color: (84, 83, 73)",
|
||||
"$ref": "#/definitions/MColor"
|
||||
},
|
||||
"fogDensity": {
|
||||
@ -548,7 +548,7 @@
|
||||
},
|
||||
"radius": {
|
||||
"type": "number",
|
||||
"description": "The internal radius (in meters) of the dimension. The default is 750 for the Hub, Escape Pod, and Angler Nest dimensions, and 500 for the others.",
|
||||
"description": "The internal radius (in meters) of the dimension. \nThe default is 750 for the Hub, Escape Pod, and Angler Nest dimensions, and 500 for the others.",
|
||||
"format": "float",
|
||||
"default": 750.0
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user