Table of Contents

Class MonoGameGlslResult

Namespace
ShadowDusk.GLSL
Assembly
ShadowDusk.GLSL.dll
public sealed record MonoGameGlslResult : IEquatable<MonoGameGlslResult>
Inheritance
MonoGameGlslResult
Implements
Inherited Members

Constructors

MonoGameGlslResult(string, IReadOnlyList<MonoGameGlslSampler>, int)

Back-compat constructor: pixel-stage results carry no attributes.

public MonoGameGlslResult(string Glsl, IReadOnlyList<MonoGameGlslSampler> Samplers, int UniformRegisterCount)

Parameters

Glsl string
Samplers IReadOnlyList<MonoGameGlslSampler>
UniformRegisterCount int

MonoGameGlslResult(string, IReadOnlyList<MonoGameGlslSampler>, int, IReadOnlyList<MonoGameGlslAttribute>)

Back-compat constructor: results without an explicit uniform layout.

public MonoGameGlslResult(string Glsl, IReadOnlyList<MonoGameGlslSampler> Samplers, int UniformRegisterCount, IReadOnlyList<MonoGameGlslAttribute> Attributes)

Parameters

Glsl string
Samplers IReadOnlyList<MonoGameGlslSampler>
UniformRegisterCount int
Attributes IReadOnlyList<MonoGameGlslAttribute>

MonoGameGlslResult(string, IReadOnlyList<MonoGameGlslSampler>, int, IReadOnlyList<MonoGameGlslAttribute>, IReadOnlyList<MonoGameGlslUniform>)

public MonoGameGlslResult(string Glsl, IReadOnlyList<MonoGameGlslSampler> Samplers, int UniformRegisterCount, IReadOnlyList<MonoGameGlslAttribute> Attributes, IReadOnlyList<MonoGameGlslUniform> Uniforms)

Parameters

Glsl string

The rewritten legacy GLSL source.

Samplers IReadOnlyList<MonoGameGlslSampler>

Samplers in declaration order, renamed to ps_s{k} (pixel stage only).

UniformRegisterCount int

0 if there was no uniform block; otherwise the number of ps_uniforms_vec4[]/vs_uniforms_vec4[] registers (one per member, a mat4 counting as four, an array counting once per element).

Attributes IReadOnlyList<MonoGameGlslAttribute>

Vertex-input attributes in declaration order, renamed to vs_v{k} (vertex stage only; empty for pixel shaders).

Uniforms IReadOnlyList<MonoGameGlslUniform>

The register layout of every uniform-block member folded into {vs,ps}_uniforms_vec4[], in allocation order across ALL blocks. Empty when the shader has no uniform block.

Properties

Attributes

Vertex-input attributes in declaration order, renamed to vs_v{k} (vertex stage only; empty for pixel shaders).

public IReadOnlyList<MonoGameGlslAttribute> Attributes { get; init; }

Property Value

IReadOnlyList<MonoGameGlslAttribute>

Glsl

The rewritten legacy GLSL source.

public string Glsl { get; init; }

Property Value

string

Samplers

Samplers in declaration order, renamed to ps_s{k} (pixel stage only).

public IReadOnlyList<MonoGameGlslSampler> Samplers { get; init; }

Property Value

IReadOnlyList<MonoGameGlslSampler>

UniformRegisterCount

0 if there was no uniform block; otherwise the number of ps_uniforms_vec4[]/vs_uniforms_vec4[] registers (one per member, a mat4 counting as four, an array counting once per element).

public int UniformRegisterCount { get; init; }

Property Value

int

Uniforms

The register layout of every uniform-block member folded into {vs,ps}_uniforms_vec4[], in allocation order across ALL blocks. Empty when the shader has no uniform block.

public IReadOnlyList<MonoGameGlslUniform> Uniforms { get; init; }

Property Value

IReadOnlyList<MonoGameGlslUniform>