mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Use original sun intensity
This commit is contained in:
parent
59e830a1f2
commit
306f81da1a
@ -28,6 +28,8 @@ namespace NewHorizons.Builder.Body
|
|||||||
|
|
||||||
if (currentController._atmosphere == null && atmosphere != null) currentController._atmosphere = atmosphere;
|
if (currentController._atmosphere == null && atmosphere != null) currentController._atmosphere = atmosphere;
|
||||||
|
|
||||||
|
if (config.Atmosphere != null && config.Atmosphere.atmosphereSunIntensity != 0) currentController._atmosphereOrigSunIntensity = config.Atmosphere.atmosphereSunIntensity;
|
||||||
|
|
||||||
if (currentController._fog == null && fog != null) currentController._fog = fog;
|
if (currentController._fog == null && fog != null) currentController._fog = fog;
|
||||||
|
|
||||||
return currentController;
|
return currentController;
|
||||||
@ -39,6 +41,7 @@ namespace NewHorizons.Builder.Body
|
|||||||
var supernovaEffectController = supernovaController.AddComponent<NHSupernovaPlanetEffectController>();
|
var supernovaEffectController = supernovaController.AddComponent<NHSupernovaPlanetEffectController>();
|
||||||
supernovaEffectController._ambientLight = ambientLight;
|
supernovaEffectController._ambientLight = ambientLight;
|
||||||
supernovaEffectController._ambientLightOrigIntensity = config.Base.ambientLight;
|
supernovaEffectController._ambientLightOrigIntensity = config.Base.ambientLight;
|
||||||
|
if (config.Atmosphere != null && config.Atmosphere.atmosphereSunIntensity != 0) supernovaEffectController._atmosphereOrigSunIntensity = config.Atmosphere.atmosphereSunIntensity;
|
||||||
supernovaEffectController._atmosphere = atmosphere;
|
supernovaEffectController._atmosphere = atmosphere;
|
||||||
supernovaEffectController._atmosphereRenderer = atmosphereRenderer;
|
supernovaEffectController._atmosphereRenderer = atmosphereRenderer;
|
||||||
supernovaEffectController._fog = fog;
|
supernovaEffectController._fog = fog;
|
||||||
|
|||||||
@ -14,6 +14,7 @@ namespace NewHorizons.Components
|
|||||||
public float _ambientLightOrigIntensity;
|
public float _ambientLightOrigIntensity;
|
||||||
public LODGroup _atmosphere;
|
public LODGroup _atmosphere;
|
||||||
public Renderer _atmosphereRenderer;
|
public Renderer _atmosphereRenderer;
|
||||||
|
public float _atmosphereOrigSunIntensity = 1;
|
||||||
public PlanetaryFogController _fog;
|
public PlanetaryFogController _fog;
|
||||||
public Renderer _fogImpostor;
|
public Renderer _fogImpostor;
|
||||||
public Color _fogOrigTint;
|
public Color _fogOrigTint;
|
||||||
@ -114,7 +115,7 @@ namespace NewHorizons.Components
|
|||||||
|
|
||||||
if (_atmosphere != null)
|
if (_atmosphere != null)
|
||||||
{
|
{
|
||||||
s_matPropBlock_Atmosphere.SetFloat(s_propID_SunIntensity, 1f - collapseProgress);
|
s_matPropBlock_Atmosphere.SetFloat(s_propID_SunIntensity, _atmosphereOrigSunIntensity * (1f - collapseProgress));
|
||||||
|
|
||||||
foreach (var lod in _atmosphereLODs)
|
foreach (var lod in _atmosphereLODs)
|
||||||
foreach (var renderer in lod.renderers)
|
foreach (var renderer in lod.renderers)
|
||||||
@ -123,7 +124,7 @@ namespace NewHorizons.Components
|
|||||||
|
|
||||||
if (_atmosphereRenderer != null)
|
if (_atmosphereRenderer != null)
|
||||||
{
|
{
|
||||||
s_matPropBlock_Atmosphere.SetFloat(s_propID_SunIntensity, 1f - collapseProgress);
|
s_matPropBlock_Atmosphere.SetFloat(s_propID_SunIntensity, _atmosphereOrigSunIntensity * (1f - collapseProgress));
|
||||||
|
|
||||||
_atmosphereRenderer.SetPropertyBlock(s_matPropBlock_Atmosphere);
|
_atmosphereRenderer.SetPropertyBlock(s_matPropBlock_Atmosphere);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user