Beispiel #1
0
        protected override void UpdateNode()
        {
            SkyMaterial.renderQueue = (int)RenderQueue + RenderQueueOffset;

            atmosphereParameters.Rg    = Radius - TerrainRadiusHold;
            atmosphereParameters.Rt    = (Radius + Height) - TerrainRadiusHold;
            atmosphereParameters.Rl    = (Radius + Height * 1.05f) - TerrainRadiusHold;
            atmosphereParameters.SCALE = Scale;

            var fadeValue = Mathf.Clamp01(VectorHelper.AngularRadius(Origin, planetoid.LODTarget.position, planetoid.PlanetRadius));

            Fade = FadeCurve.Evaluate(float.IsNaN(fadeValue) || float.IsInfinity(fadeValue) ? 1.0f : fadeValue);

            Keywords = planetoid.GetKeywords();

            SetUniforms(SkyMaterial);
        }