Type of Sky that is generated procedurally based on user input parameters.
    public class ProceduralSky : Sky

ProceduralSky provides a way to create an effective background quickly by defining procedural parameters for the sun, the sky and the ground. The sky and ground are very similar, they are defined by a color at the horizon, another color, and finally an easing curve to interpolate between these two colors. Similarly the sun is described by a position in the sky, a color, and an easing curve. However, the sun also defines a minimum and maximum angle, these two values define at what distance the easing curve begins and ends from the sun, and thus end up defining the size of the sun in the sky.

The ProceduralSky is updated on the CPU after the parameters change and stored in a texture and then displayed as a background in the scene. This makes it relatively unsuitable for realtime updates during gameplay. But with a small texture size it is still feasible to update relatively frequently becuase it is updated on a background thread when multi-threading is available.

Inheritance Chain

Constructors

    public ProceduralSky()

Properties

    public Color GroundBottomColor { get; set; }

Color of the ground at the bottom.

    public float GroundCurve { get; set; }

How quickly the GroundHorizonColor fades into the GroundBottomColor.

    public float GroundEnergy { get; set; }

Amount of energy contribution from the ground.

    public Color GroundHorizonColor { get; set; }

Color of the ground at the horizon.

    public float SkyCurve { get; set; }

How quickly the SkyHorizonColor fades into the SkyTopColor.

    public float SkyEnergy { get; set; }

Amount of energy contribution from the sky.

    public Color SkyHorizonColor { get; set; }

Color of the sky at the horizon.

    public Color SkyTopColor { get; set; }

Color of the sky at the top.

    public float SunAngleMax { get; set; }

Distance from center of sun where it fades out completely.

    public float SunAngleMin { get; set; }

Distance from sun where it goes from solid to starting to fade.

    public Color SunColor { get; set; }

Color of the sun.

    public float SunCurve { get; set; }

How quickly the sun fades away between SunAngleMin and SunAngleMax

    public float SunEnergy { get; set; }

Amount of energy contribution from the sun.

    public float SunLatitude { get; set; }

The suns height using polar coordinates.

    public float SunLongitude { get; set; }

The direction of the sun using polar coordinates.

    public TextureSizeEnum TextureSize { get; set; }

Size of Texture that the ProceduralSky will generate.

Methods

    public Color GetGroundBottomColor()

Getter for GroundBottomColor

    public float GetGroundCurve()

Getter for GroundCurve

    public float GetGroundEnergy()

Getter for GroundEnergy

    public Color GetGroundHorizonColor()

Getter for GroundHorizonColor

    public float GetSkyCurve()

Getter for SkyCurve

    public float GetSkyEnergy()

Getter for SkyEnergy

    public Color GetSkyHorizonColor()

Getter for SkyHorizonColor

    public Color GetSkyTopColor()

Getter for SkyTopColor

    public float GetSunAngleMax()

Getter for SunAngleMax

    public float GetSunAngleMin()

Getter for SunAngleMin

    public Color GetSunColor()

Getter for SunColor

    public float GetSunCurve()

Getter for SunCurve

    public float GetSunEnergy()

Getter for SunEnergy

    public float GetSunLatitude()

Getter for SunLatitude

    public float GetSunLongitude()

Getter for SunLongitude

    public TextureSizeEnum GetTextureSize()

Getter for TextureSize

    public void SetGroundBottomColor(Color color)

Setter for GroundBottomColor

    public void SetGroundCurve(float curve)

Setter for GroundCurve

    public void SetGroundEnergy(float energy)

Setter for GroundEnergy

    public void SetGroundHorizonColor(Color color)

Setter for GroundHorizonColor

    public void SetSkyCurve(float curve)

Setter for SkyCurve

    public void SetSkyEnergy(float energy)

Setter for SkyEnergy

    public void SetSkyHorizonColor(Color color)

Setter for SkyHorizonColor

    public void SetSkyTopColor(Color color)

Setter for SkyTopColor

    public void SetSunAngleMax(float degrees)

Setter for SunAngleMax

    public void SetSunAngleMin(float degrees)

Setter for SunAngleMin

    public void SetSunColor(Color color)

Setter for SunColor

    public void SetSunCurve(float curve)

Setter for SunCurve

    public void SetSunEnergy(float energy)

Setter for SunEnergy

    public void SetSunLatitude(float degrees)

Setter for SunLatitude

    public void SetSunLongitude(float degrees)

Setter for SunLongitude

    public void SetTextureSize(TextureSizeEnum size)

Setter for TextureSize

Inner Types

TextureSizeEnum

Name Value Description
Size256    
Size512    
Size1024    
Size2048    
Size4096    
Max 5  
Tags: