Skip to content

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.

C#
public readonly struct ShaderDescription : IEquatable<ShaderDescription>

Implements

IEquatable<ShaderDescription>

Constructors

ShaderDescription(ShaderStage, ShaderFormat, ReadOnlyMemory<byte>, string, ShaderResources)

A custom shader; requires Shaders and a Format in ShaderFormats.

C#
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.

C#
public ReadOnlyMemory<byte> Code { get; init; }

Property Value

ReadOnlyMemory<byte>

EntryPoint

Entry point name (“main”; “main0” for MSL generated by SPIRV-Cross).

C#
public string EntryPoint { get; init; }

Property Value

string

Format

One bytecode format the device declares.

C#
public ShaderFormat Format { get; init; }

Property Value

ShaderFormat

Resources

Reflected resource counts.

C#
public ShaderResources Resources { get; init; }

Property Value

ShaderResources

Stage

Stage.

C#
public ShaderStage Stage { get; init; }

Property Value

ShaderStage

Methods

Deconstruct(out ShaderStage, out ShaderFormat, out ReadOnlyMemory<byte>, out string, out ShaderResources)

C#
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)

C#
public override bool Equals(object obj)

Parameters

obj object

Returns

bool

Equals(ShaderDescription)

C#
public bool Equals(ShaderDescription other)

Parameters

other ShaderDescription

Returns

bool

GetHashCode()

C#
public override int GetHashCode()

Returns

int

ToString()

C#
public override string ToString()

Returns

string

Operators

operator ==(ShaderDescription, ShaderDescription)

C#
public static bool operator ==(ShaderDescription left, ShaderDescription right)

Parameters

left ShaderDescription

right ShaderDescription

Returns

bool

operator !=(ShaderDescription, ShaderDescription)

C#
public static bool operator !=(ShaderDescription left, ShaderDescription right)

Parameters

left ShaderDescription

right ShaderDescription

Returns

bool