Table of Contents

Namespace Stride.CommunityToolkit.Rendering

Classes

AnchorExtensions

Where each Anchor is for a rectangle of a given size.

BufferExtensions

Provides extension methods for Buffer.

DisplayScale

The factor anything measured in pixels should be multiplied by to look the size it was designed at on the display the game is on: 1 on a 100% display, 1.5 on a 150% one, 2 on a Retina screen.

EarClipping

Triangulates 2D polygons by ear clipping, with or without holes.

GeometricMeshDataExtensions

Turns CPU mesh data into something a Mesh can draw.

GradientCubemap

Builds a cubemap whose colour depends only on the direction's elevation: a gradient sky with no texture asset.

GraphicsDeviceExtensions

Provides extension methods for the GraphicsDevice to simplify common operations related to graphics rendering.

HighlightShell

One glowing shell that moves onto whatever should look highlighted: a copy of the target's model, every material slot filled with a highlight material, drawn a little larger over the original. A selection or hover highlight with no render feature and no post effect, only a material and an entity - the way the engine's TopDownRPG template lights up the loot under the mouse.

MaterialDescriptors

The descriptors behind the toolkit's material helpers, for when a helper's material is nearly right: take the descriptor, add or swap a feature, and compile it with game.CreateMaterial(descriptor) or Material.New.

MaterialExtensions

Extension methods for Material.

MaterialParameters

Changes a compiled material at runtime through its parameters, the way the engine's own gizmo materials do: no rebuild, the value is picked up by the next draw.

MaterialStreamRenderFeature

The mesh feature's half of a MaterialStreamView: sets the forward effect's PixelStageSurfaceFilter permutation on every effect drawn this frame, so each mesh is shaded by the filter's shader instead of its lighting. A port of the render feature behind Game Studio's view modes.

MaterialStreamView

Draws every mesh with one material stream as its colour, the way Game Studio's view modes do: the diffuse, the glossiness, the normals. The quickest way to see why a material looks wrong, since a normal map loaded as sRGB or a glossiness map read from the wrong channel is obvious as a colour and invisible under lighting. Added by game.AddMaterialStreamView().

MaterialStreamViewExtensions

Adds Game Studio's material view modes to a game.

MeshBuilder

Builds a MeshDraw from vertex elements of any unmanaged type, with optional indices.

MeshBuilderExtensions

Higher-level shapes composed on top of MeshBuilder's per-vertex API.

SkyboxGenerator

Provides functionality to generate a skybox with diffuse and specular lighting parameters from a given texture.

SkyboxGeneratorContext

Provides context for generating a skybox by encapsulating relevant services and rendering contexts.

TextureCanvas

Provides functionality for drawing and manipulating textures on a canvas. This class supports various operations such as drawing rectangles, drawing textures, applying filters, transforming colors, and resampling textures. It is designed to work with the Stride graphics framework and provides methods for loading and storing texture data.

TextureCanvasExtensions

Provides extension methods for creating instances of TextureCanvas.

TextureExtensions

Extension methods for Texture: a copy at another size or in another pixel format, drawn through a TextureCanvas, and the source file of a texture asset in a source checkout.

TextureLoadOptions

How a TextureLoader prepares a texture: its role, and the steps the content pipeline takes at import that a runtime load has to take by hand. The defaults are the pipeline's, except the green flip of a normal map, which the engine's own convention does not need.

TextureLoader

Loads image files into textures the way Game Studio's content pipeline would have prepared them, by what the texture is for: a colour as sRGB and premultiplied, data as linear, a normal map linear with unit normals in every mip, each with a full mipmap chain. Each file is loaded once per role and kept until the loader is disposed.

TexturePixels

The pixel work a TextureLoader does between decoding a file and creating the texture, on plain RGBA arrays: the sRGB transfer function, premultiplication, the green flip of a normal map, and a mipmap chain filtered the right way for each role. Public so a texture made in code can take the same steps before Texture.New2D.

Enums

Anchor

A point of a rectangle: the four corners, the middle of each edge and the centre. The rectangle is whatever is being anchored: the screen or a panel, for where a HUD element, an overlay or anchored text is pinned so it stays put when the window is resized; a block of text, for which point of it sits on the position it is drawn at; or a TextureCanvas destination, for how a source is aligned inside it.

IndexingType

Specifies index element size used when building indexed geometry.

MaterialStream

The material streams a MaterialStreamView can draw in place of the lit colour: the values the material's features wrote before lighting ran, which is what Game Studio's view modes show. Every mesh in the view draws the same stream.

Stretch

Specifies how a texture is scaled when drawn to a TextureCanvas.

TextureRole

What a texture is for, which decides how its pixels must be read: the same three choices Game Studio offers as a texture asset's type. Load a texture in the wrong role and the material still compiles and still draws, just wrongly, which is why the role is chosen once, at load.