/// <summary>
 /// Renders the atmosphere
 /// </summary>
 /// <param name="context">Rendering context</param>
 public override void Render( IUniRenderContext context )
 {
     if ( context.CurrentPass != UniRenderPass.FarObjects )
     {
         return;
     }
     SetupAtmosphereEffectParameters( context.Camera, m_Techniques.Effect, false, true );
     context.ApplyTechnique( m_Techniques, AtmosphereGeometry );
 }
 /// <summary>
 /// Renders this object
 /// </summary>
 /// <param name="context">Rendering context</param>
 public override void Render( IUniRenderContext context )
 {
     IPlanetSimpleCloudModel simpleCloudModel = GetModel<IPlanetSimpleCloudModel>( );
     if ( simpleCloudModel == null )
     {
         DestroyCloudShell( );
         return;
     }
     if ( DoesCloudShellRequireRebuild( simpleCloudModel ) )
     {
         BuildCloudShell( simpleCloudModel );
     }
     SetupCloudEffectParameters( m_Technique.Effect );
     context.ApplyTechnique( m_Technique, m_CloudShell );
 }
        /// <summary>
        /// Renders this object
        /// </summary>
        /// <param name="context">Rendering context</param>
        public override void Render( IUniRenderContext context )
        {
            if ( context.CurrentPass != UniRenderPass.CloseObjects )
            {
                return;
            }

            IPlanetOceanModel ocean = GetModel<IPlanetOceanModel>( );
            if ( ocean == null )
            {
                return;
            }

            GameProfiles.Game.Rendering.PlanetRendering.OceanRendering.Begin( );

            float seaLevel = ( Planet.Model.Radius + ocean.SeaLevel ).ToRenderUnits;
            seaLevel /= 10.0f;
            Graphics.Renderer.PushTransform( TransformType.LocalToWorld );
            Graphics.Renderer.Scale( TransformType.LocalToWorld, seaLevel, seaLevel, seaLevel );

            m_WaveAnimation.UpdateAnimation( context.RenderTime );
            m_Technique.Effect.Parameters[ "OceanTexture0" ].Set( m_WaveAnimation.SourceTexture );
            m_Technique.Effect.Parameters[ "OceanTexture1" ].Set( m_WaveAnimation.DestinationTexture );
            m_Technique.Effect.Parameters[ "OceanTextureT" ].Set( m_WaveAnimation.LocalT );

            context.ApplyTechnique( m_Technique, m_OceanGeometry );

            Graphics.Renderer.PopTransform( TransformType.LocalToWorld );

            GameProfiles.Game.Rendering.PlanetRendering.OceanRendering.End( );
        }
        /// Renders this object
        /// </summary>
        /// <param name="context">Rendering context</param>
        public override void Render( IUniRenderContext context )
        {
            //	if ( context.CurrentPass != UniRenderPass.CloseObjects )
            if ( context.RenderFarObjects )
            {
                return;
            }

            //	Get ocean model
            IPlanetOceanModel model = Planet.Model.GetModel<IPlanetOceanModel>( );
            if ( model == null )
            {
                return;
            }

            //	Create ocean geometry
            Units.Metres expectedGeometryRadius = Planet.Model.Radius.ToMetres + model.SeaLevel;
            if ( ( m_FarGeometry == null ) ||  ( expectedGeometryRadius != m_GeometryRadius ) )
            {
                m_FarGeometry = CreateGeoSphere( expectedGeometryRadius, 40 );
            }

            //	Render ocean
            GameProfiles.Game.Rendering.PlanetRendering.OceanRendering.Begin( );

            m_WaveAnimation.UpdateAnimation( context.RenderTime );

            SetupOceanTexturesInEffect( m_Technique.Effect );
            context.ApplyTechnique( m_Technique, m_FarGeometry );

            GameProfiles.Game.Rendering.PlanetRendering.OceanRendering.End( );
        }