This commit is contained in:
JohnCorby 2023-07-18 20:59:21 -07:00
parent 76cca07f2d
commit 8a17c693e4

View File

@ -59,9 +59,10 @@ namespace NewHorizons.Builder.Atmosphere
PFC.lodFadeDistance = PFC.fogRadius * 0.5f; PFC.lodFadeDistance = PFC.fogRadius * 0.5f;
PFC.fogDensity = atmo.fogDensity; PFC.fogDensity = atmo.fogDensity;
PFC.fogExponent = 1f; PFC.fogExponent = 1f;
var colorRampTexture = atmo.fogTint == null ? _ramp : ImageUtilities.TintImage(_ramp, atmo.fogTint.ToColor()); var colorRampTexture =
// maybe dont tint image since this overrides? oh well atmo.fogRampPath != null ? ImageUtilities.GetTexture(mod, atmo.fogRampPath) :
if (atmo.fogRampPath != null) colorRampTexture = ImageUtilities.GetTexture(mod, atmo.fogRampPath, wrap: false); atmo.fogTint != null ? ImageUtilities.TintImage(_ramp, atmo.fogTint.ToColor()) :
_ramp;
PFC.fogColorRampTexture = colorRampTexture; PFC.fogColorRampTexture = colorRampTexture;
PFC.fogColorRampIntensity = 1f; PFC.fogColorRampIntensity = 1f;
if (atmo.fogTint != null) if (atmo.fogTint != null)
@ -97,9 +98,10 @@ namespace NewHorizons.Builder.Atmosphere
MR.materials = _dbImpostorMaterials; MR.materials = _dbImpostorMaterials;
MR.allowOcclusionWhenDynamic = true; MR.allowOcclusionWhenDynamic = true;
var colorRampTexture = atmo.fogTint == null ? _ramp : ImageUtilities.TintImage(_ramp, atmo.fogTint.ToColor()); var colorRampTexture =
// maybe dont tint image since this overrides? oh well atmo.fogRampPath != null ? ImageUtilities.GetTexture(mod, atmo.fogRampPath) :
if (atmo.fogRampPath != null) colorRampTexture = ImageUtilities.GetTexture(mod, atmo.fogRampPath, wrap: false); atmo.fogTint != null ? ImageUtilities.TintImage(_ramp, atmo.fogTint.ToColor()) :
_ramp;
if (atmo.fogTint != null) if (atmo.fogTint != null)
{ {
MR.material.SetColor(Tint, atmo.fogTint.ToColor()); MR.material.SetColor(Tint, atmo.fogTint.ToColor());