check null fog man

This commit is contained in:
JohnCorby 2022-07-24 21:32:42 -07:00
parent 19c5daaba6
commit a119afcfce

View File

@ -44,9 +44,12 @@ namespace NewHorizons.Builder.Atmosphere
var colorRampTexture = atmo.fogTint == null ? _ramp : ImageUtilities.TintImage(_ramp, atmo.fogTint.ToColor());
PFC.fogColorRampTexture = colorRampTexture;
PFC.fogColorRampIntensity = 1f;
PFC.fogTint = atmo.fogTint.ToColor();
if (atmo.fogTint != null)
{
PFC.fogTint = atmo.fogTint.ToColor();
MR.material.SetColor(Tint, atmo.fogTint.ToColor());
MR.material.SetColor(Tint, atmo.fogTint.ToColor());
}
MR.material.SetFloat(Radius, atmo.fogSize);
MR.material.SetFloat(Density, atmo.fogDensity);
MR.material.SetFloat(DensityExponent, 1);