GraphicsAPI reference
Struct ShaderDescription
Namespace: MicroEngine.Graphics.Devices
Assembly: MicroEngine.Graphics.dll
Guide: The graphics device
A custom shader; requires Shaders and a Format in ShaderFormats.
public readonly struct ShaderDescription : IEquatable<ShaderDescription>Implements
Constructors
ShaderDescription(ShaderStage, ShaderFormat, ReadOnlyMemory<byte>, string, ShaderResources)
A custom shader; requires Shaders and a Format in ShaderFormats.
public ShaderDescription(ShaderStage Stage, ShaderFormat Format, ReadOnlyMemory<byte> Code, string EntryPoint, ShaderResources Resources)Parameters
Stage ShaderStage
Stage.
Format ShaderFormat
One bytecode format the device declares.
Code ReadOnlyMemory<byte>
Bytecode (or MSL source) produced offline.
EntryPoint string
Entry point name (“main”; “main0” for MSL generated by SPIRV-Cross).
Resources ShaderResources
Reflected resource counts.
Properties
Code
Bytecode (or MSL source) produced offline.
public ReadOnlyMemory<byte> Code { get; init; }Property Value
EntryPoint
Entry point name (“main”; “main0” for MSL generated by SPIRV-Cross).
public string EntryPoint { get; init; }Property Value
Format
One bytecode format the device declares.
public ShaderFormat Format { get; init; }Property Value
Resources
Reflected resource counts.
public ShaderResources Resources { get; init; }Property Value
Stage
Stage.
public ShaderStage Stage { get; init; }Property Value
Methods
Deconstruct(out ShaderStage, out ShaderFormat, out ReadOnlyMemory<byte>, out string, out ShaderResources)
public void Deconstruct(out ShaderStage Stage, out ShaderFormat Format, out ReadOnlyMemory<byte> Code, out string EntryPoint, out ShaderResources Resources)Parameters
Stage ShaderStage
Format ShaderFormat
Code ReadOnlyMemory<byte>
EntryPoint string
Resources ShaderResources
Equals(object)
public override bool Equals(object obj)Parameters
obj object
Returns
Equals(ShaderDescription)
public bool Equals(ShaderDescription other)Parameters
other ShaderDescription
Returns
GetHashCode()
public override int GetHashCode()Returns
ToString()
public override string ToString()Returns
Operators
operator ==(ShaderDescription, ShaderDescription)
public static bool operator ==(ShaderDescription left, ShaderDescription right)Parameters
left ShaderDescription
right ShaderDescription
Returns
operator !=(ShaderDescription, ShaderDescription)
public static bool operator !=(ShaderDescription left, ShaderDescription right)Parameters
left ShaderDescription
right ShaderDescription