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
SlotintDeclaration order (0-based) — the
{N}invs_v{N}.NamestringAlways
vs_v{Slot}.UsagebyteMonoGame
VertexElementUsagebyte (Position=0, Color=1, TextureCoordinate=2, Normal=3, …).IndexbyteThe semantic index (e.g. TEXCOORD1 → 1).
Properties
Index
The semantic index (e.g. TEXCOORD1 → 1).
public byte Index { get; init; }
Property Value
Name
Always vs_v{Slot}.
public string Name { get; init; }
Property Value
Slot
Declaration order (0-based) — the {N} in vs_v{N}.
public int Slot { get; init; }
Property Value
Usage
MonoGame VertexElementUsage byte (Position=0, Color=1, TextureCoordinate=2, Normal=3, …).
public byte Usage { get; init; }