Table of Contents

Class MonoGameGlslAttribute

Namespace
ShadowDusk.GLSL
Assembly
ShadowDusk.GLSL.dll

One vertex-input attribute discovered while rewriting a VERTEX shader's SPIRV-Cross GLSL. The attribute is renamed to the MojoShader form vs_v{Slot} (declaration order), and Usage/Index carry the VertexElementUsage+semantic-index the pipeline writes into the .mgfx attribute table so MonoGame's GL runtime binds the attribute to the right vertex element. Empty for pixel shaders.

public sealed record MonoGameGlslAttribute : IEquatable<MonoGameGlslAttribute>
Inheritance
MonoGameGlslAttribute
Implements
Inherited Members

Constructors

MonoGameGlslAttribute(int, string, byte, byte)

One vertex-input attribute discovered while rewriting a VERTEX shader's SPIRV-Cross GLSL. The attribute is renamed to the MojoShader form vs_v{Slot} (declaration order), and Usage/Index carry the VertexElementUsage+semantic-index the pipeline writes into the .mgfx attribute table so MonoGame's GL runtime binds the attribute to the right vertex element. Empty for pixel shaders.

public MonoGameGlslAttribute(int Slot, string Name, byte Usage, byte Index)

Parameters

Slot int

Declaration order (0-based) — the {N} in vs_v{N}.

Name string

Always vs_v{Slot}.

Usage byte

MonoGame VertexElementUsage byte (Position=0, Color=1, TextureCoordinate=2, Normal=3, …).

Index byte

The semantic index (e.g. TEXCOORD1 → 1).

Properties

Index

The semantic index (e.g. TEXCOORD1 → 1).

public byte Index { get; init; }

Property Value

byte

Name

Always vs_v{Slot}.

public string Name { get; init; }

Property Value

string

Slot

Declaration order (0-based) — the {N} in vs_v{N}.

public int Slot { get; init; }

Property Value

int

Usage

MonoGame VertexElementUsage byte (Position=0, Color=1, TextureCoordinate=2, Normal=3, …).

public byte Usage { get; init; }

Property Value

byte