mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Make stars not do shader stuff if luminosity is 0
This commit is contained in:
parent
7f1e52af55
commit
93a9d2c40f
@ -152,14 +152,18 @@ namespace NewHorizons.Builder.Body
|
|||||||
starGO.transform.localPosition = Vector3.zero;
|
starGO.transform.localPosition = Vector3.zero;
|
||||||
starGO.transform.localScale = starModule.Size * Vector3.one;
|
starGO.transform.localScale = starModule.Size * Vector3.one;
|
||||||
|
|
||||||
var starController = body.AddComponent<StarController>();
|
StarController starController = null;
|
||||||
starController.Light = light;
|
if (starModule.SolarLuminosity != 0)
|
||||||
starController.AmbientLight = ambientLight;
|
{
|
||||||
starController.FaceActiveCamera = faceActiveCamera;
|
starController = body.AddComponent<StarController>();
|
||||||
starController.CSMTextureCacher = csmTextureCacher;
|
starController.Light = light;
|
||||||
starController.ProxyShadowLight = proxyShadowLight;
|
starController.AmbientLight = ambientLight;
|
||||||
starController.Intensity = starModule.SolarLuminosity;
|
starController.FaceActiveCamera = faceActiveCamera;
|
||||||
starController.SunColor = lightColour;
|
starController.CSMTextureCacher = csmTextureCacher;
|
||||||
|
starController.ProxyShadowLight = proxyShadowLight;
|
||||||
|
starController.Intensity = starModule.SolarLuminosity;
|
||||||
|
starController.SunColor = lightColour;
|
||||||
|
}
|
||||||
|
|
||||||
if (starModule.Curve != null)
|
if (starModule.Curve != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -28,6 +28,8 @@ namespace NewHorizons.Utility
|
|||||||
|
|
||||||
public void AddStar(StarController star)
|
public void AddStar(StarController star)
|
||||||
{
|
{
|
||||||
|
if (star == null) return;
|
||||||
|
|
||||||
Logger.Log($"Adding new star to list: {star.gameObject.name}");
|
Logger.Log($"Adding new star to list: {star.gameObject.name}");
|
||||||
_stars.Add(star);
|
_stars.Add(star);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user