Example #1
0
        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!");
            }
        }
Example #2
0
        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();
        }
Example #3
0
        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);
        }
Example #4
0
 public void InitSetAtmosphereUniforms(Atmosphere atmosphere)
 {
     InitUniforms(planetoid.QuadAtmosphereMPB, SkyMaterial, true);
     SetUniforms(planetoid.QuadAtmosphereMPB, SkyMaterial, true);
 }