Table of Contents

Enum TextureRole

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

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.

public enum TextureRole

Fields

Color = 0

A colour: an albedo, an emissive, a sprite. Stored sRGB, so the GPU decodes it to linear when it samples, and premultiplied by its alpha, which is what the engine's blend states expect.

Data = 1

Numbers stored as pixels: glossiness, metalness, occlusion, a mask, a height map. Linear, never gamma-decoded, never premultiplied: a glossiness of 0.5 must sample as 0.5.

NormalMap = 2

A tangent-space normal map: linear like data, its mipmaps renormalised so a distant surface keeps unit normals, its green channel inverted on request for a map whose green points up.