mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Fix cloud colours
This commit is contained in:
parent
b5c7fd7e28
commit
6779a66ecf
@ -92,20 +92,29 @@ namespace NewHorizons.Builder.Atmosphere
|
||||
cloudsBottomGO.transform.localScale = Vector3.one * (atmo.Size * 0.9f);
|
||||
|
||||
TessellatedSphereRenderer bottomTSR = cloudsBottomGO.AddComponent<TessellatedSphereRenderer>();
|
||||
bottomTSR.tessellationMeshGroup = GameObject.Find("CloudsBottomLayer_GD").GetComponent<TessellatedSphereRenderer>().tessellationMeshGroup;
|
||||
bottomTSR.tessellationMeshGroup = GameObject.Find("CloudsBottomLayer_QM").GetComponent<TessellatedSphereRenderer>().tessellationMeshGroup;
|
||||
var bottomTSRMaterials = GameObject.Find("CloudsBottomLayer_QM").GetComponent<TessellatedSphereRenderer>().sharedMaterials;
|
||||
var bottomTSRTempArray = new Material[bottomTSRMaterials.Length];
|
||||
|
||||
// It's a bit too green
|
||||
var bottomColor = atmo.CloudTint.ToColor32();
|
||||
bottomColor.g = (byte)(bottomColor.g * 0.5f);
|
||||
for (int i = 0; i < bottomTSRMaterials.Length; i++)
|
||||
|
||||
// If they set a colour apply it to all the materials else keep the default QM one
|
||||
if (atmo.CloudTint != null)
|
||||
{
|
||||
bottomTSRTempArray[i] = new Material(bottomTSRMaterials[i]);
|
||||
bottomTSRTempArray[i].SetColor("_Color", bottomColor);
|
||||
bottomTSRTempArray[i].SetColor("_TintColor", bottomColor);
|
||||
var bottomColor = atmo.CloudTint.ToColor32();
|
||||
|
||||
var bottomTSRTempArray = new Material[2];
|
||||
|
||||
bottomTSRTempArray[0] = new Material(bottomTSRMaterials[0]);
|
||||
bottomTSRTempArray[0].SetColor("_Color", bottomColor);
|
||||
bottomTSRTempArray[0].SetColor("_TintColor", bottomColor);
|
||||
|
||||
bottomTSRTempArray[1] = new Material(bottomTSRMaterials[1]);
|
||||
|
||||
bottomTSR.sharedMaterials = bottomTSRTempArray;
|
||||
}
|
||||
bottomTSR.sharedMaterials = bottomTSRTempArray;
|
||||
else
|
||||
{
|
||||
bottomTSR.sharedMaterials = bottomTSRMaterials;
|
||||
}
|
||||
|
||||
bottomTSR.maxLOD = 6;
|
||||
bottomTSR.LODBias = 0;
|
||||
bottomTSR.LODRadius = 1f;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user