Class GradientCubemap
Builds a cubemap whose colour depends only on the direction's elevation: a gradient sky with no texture asset.
public static class GradientCubemap
- Inheritance
-
GradientCubemap
Methods
Create(GraphicsDevice, Color, Color, Color, int)
Creates the cubemap: horizon at the horizon, blending to zenith above
and nadir below.
public static Texture Create(GraphicsDevice device, Color zenith, Color horizon, Color nadir, int size = 64)
Parameters
deviceGraphicsDeviceThe graphics device the texture is created on.
zenithColorThe colour straight up.
horizonColorThe colour at the horizon.
nadirColorThe colour straight down.
sizeintThe width of each face, in pixels; the gradient is smooth, so a small face is enough.
Returns
- Texture
An immutable cube texture usable as a BackgroundComponent texture and as a skybox source.