Class MonoGameGlslResult
- Namespace
- ShadowDusk.GLSL
- Assembly
- ShadowDusk.GLSL.dll
Result of Rewrite(string, ShaderStage).
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
GlslstringSamplersIReadOnlyList<MonoGameGlslSampler>UniformRegisterCountint
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
GlslstringSamplersIReadOnlyList<MonoGameGlslSampler>UniformRegisterCountintAttributesIReadOnlyList<MonoGameGlslAttribute>
MonoGameGlslResult(string, IReadOnlyList<MonoGameGlslSampler>, int, IReadOnlyList<MonoGameGlslAttribute>, IReadOnlyList<MonoGameGlslUniform>)
Result of Rewrite(string, ShaderStage).
public MonoGameGlslResult(string Glsl, IReadOnlyList<MonoGameGlslSampler> Samplers, int UniformRegisterCount, IReadOnlyList<MonoGameGlslAttribute> Attributes, IReadOnlyList<MonoGameGlslUniform> Uniforms)
Parameters
GlslstringThe rewritten legacy GLSL source.
SamplersIReadOnlyList<MonoGameGlslSampler>Samplers in declaration order, renamed to
ps_s{k}(pixel stage only).UniformRegisterCountint0 if there was no uniform block; otherwise the number of
ps_uniforms_vec4[]/vs_uniforms_vec4[]registers (one per member, amat4counting as four, an array counting once per element).AttributesIReadOnlyList<MonoGameGlslAttribute>Vertex-input attributes in declaration order, renamed to
vs_v{k}(vertex stage only; empty for pixel shaders).UniformsIReadOnlyList<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
Glsl
The rewritten legacy GLSL source.
public string Glsl { get; init; }
Property Value
Samplers
Samplers in declaration order, renamed to ps_s{k} (pixel stage only).
public IReadOnlyList<MonoGameGlslSampler> Samplers { get; init; }
Property Value
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
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; }