mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Actually colour water properly
This commit is contained in:
parent
218c760e7a
commit
58947aaba8
@ -39,7 +39,8 @@ namespace NewHorizons.Builder.Body
|
||||
tempArray[i] = new Material(GDSharedMaterials[i]);
|
||||
if (module.Tint != null)
|
||||
{
|
||||
tempArray[i].color = module.Tint.ToColor32();
|
||||
tempArray[i].color = module.Tint.ToColor();
|
||||
tempArray[i].SetColor("_FogColor", module.Tint.ToColor());
|
||||
}
|
||||
}
|
||||
|
||||
@ -80,6 +81,13 @@ namespace NewHorizons.Builder.Body
|
||||
fogGO.name = "OceanFog";
|
||||
fogGO.transform.localPosition = Vector3.zero;
|
||||
fogGO.transform.localScale = Vector3.one;
|
||||
if(module.Tint != null)
|
||||
{
|
||||
var adjustedColour = module.Tint.ToColor() / 4f;
|
||||
adjustedColour.a = 1f;
|
||||
|
||||
fogGO.GetComponent<MeshRenderer>().material.color = adjustedColour;
|
||||
}
|
||||
|
||||
if (module.Curve != null)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user