Table of Contents

Class GradientCubemap

Namespace
Stride.CommunityToolkit.Rendering
Assembly
Stride.CommunityToolkit.dll

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

device GraphicsDevice

The graphics device the texture is created on.

zenith Color

The colour straight up.

horizon Color

The colour at the horizon.

nadir Color

The colour straight down.

size int

The 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.