/// <summary>
        /// Constructor
        /// </summary>
        public SkyScatteringDescription()
            : base()
        {
            this.PlanetRadius           = EarthRadius;
            this.PlanetAtmosphereRadius = EarthAtmosphereRadius;

            this.RayleighScattering = RayleighScatteringConstant;
            this.RayleighScaleDepth = RayleighScaleDepthConstant;
            this.MieScattering      = MieScatteringConstant;
            this.MiePhaseAssymetry  = MiePhaseAssymetryFactor;
            this.MieScaleDepth      = MieScaleDepthConstant;

            this.WaveLength  = SunLightWaveLength;
            this.Brightness  = EarthSkyBrightness;
            this.HDRExposure = 2.0f;
            this.Resolution  = SkyScatteringResolutions.Low;

            this.Static          = true;
            this.CastShadow      = false;
            this.DeferredEnabled = true;
            this.DepthEnabled    = false;
            this.AlphaEnabled    = false;
        }
Пример #2
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="scene">Scene</param>
        /// <param name="description">Sky scattering description class</param>
        public SkyScattering(Scene scene, SkyScatteringDescription description)
            : base(scene, description)
        {
            this.PlanetRadius           = description.PlanetRadius;
            this.PlanetAtmosphereRadius = description.PlanetAtmosphereRadius;

            this.RayleighScattering = description.RayleighScattering;
            this.RayleighScaleDepth = description.RayleighScaleDepth;
            this.MieScattering      = description.MieScattering;
            this.MiePhaseAssymetry  = description.MiePhaseAssymetry;
            this.MieScaleDepth      = description.MieScaleDepth;

            this.WaveLength  = description.WaveLength;
            this.Brightness  = description.Brightness;
            this.HDRExposure = description.HDRExposure;
            this.Resolution  = description.Resolution;

            this.sphereInnerRadius = 1.0f;
            this.sphereOuterRadius = this.sphereInnerRadius * 1.025f;
            this.CalcScale();

            this.InitializeBuffers(description.Name);
        }