public void ReanimateAtmosphereUniforms(Atmosphere atmosphere, Planetoid planetoid) { if (atmosphere != null && planetoid != null) { atmosphere.InitSetPlanetoidUniforms(planetoid); atmosphere.InitSetAtmosphereUniforms(); for (byte i = 0; i < Suns.Count; i++) { if (Suns[i] != null) { var sunGlareComponent = Suns[i].GetComponent <SunGlare>(); if (sunGlareComponent != null) { sunGlareComponent.InitSetAtmosphereUniforms(); } } } } else { Debug.Log("Atmosphere: Reanimation fail!"); } }
private void OnAtmospherePresetChanged(Planetoid planetoid, Atmosphere atmosphere) { if (planetoid == null) { Debug.Log("Atmosphere: OnAtmospherePresetChanged planetoid is null!"); return; } if (atmosphere == null) { Debug.Log("Atmosphere: OnAtmospherePresetChanged atmosphere is null!"); return; } atmosphere.TryBake(); planetoid.ReSetupQuads(); }
private void OnAtmosphereBaked(Planetoid planetoid, Atmosphere atmosphere) { if (planetoid == null) { Debug.Log("Atmosphere: OnAtmosphereBaked planetoid is null!"); return; } if (atmosphere == null) { Debug.Log("Atmosphere: OnAtmosphereBaked atmosphere is null!"); return; } atmosphere.ApplyTestPresset(AtmosphereParameters.Get(atmosphere.AtmosphereBase)); atmosphere.ReanimateAtmosphereUniforms(atmosphere, planetoid); }
public void InitSetAtmosphereUniforms(Atmosphere atmosphere) { InitUniforms(planetoid.QuadAtmosphereMPB, SkyMaterial, true); SetUniforms(planetoid.QuadAtmosphereMPB, SkyMaterial, true); }