Table of Contents

Struct ShaderDescription

Namespace
NeoVeldrid
Assembly
NeoVeldrid.dll

Describes a Shader, for creation using a ResourceFactory.

public struct ShaderDescription : IEquatable<ShaderDescription>
Implements
Inherited Members

Constructors

ShaderDescription(ShaderStages, byte[], string)

Constructs a new ShaderDescription.

public ShaderDescription(ShaderStages stage, byte[] shaderBytes, string entryPoint)

Parameters

stage ShaderStages

The shader stage to create.

shaderBytes byte[]

An array containing the raw shader bytes.

entryPoint string

The name of the entry point function in the shader module to be used in this stage.

ShaderDescription(ShaderStages, byte[], string, bool)

Constructs a new ShaderDescription.

public ShaderDescription(ShaderStages stage, byte[] shaderBytes, string entryPoint, bool debug)

Parameters

stage ShaderStages

The shader stage to create.

shaderBytes byte[]

An array containing the raw shader bytes.

entryPoint string

The name of the entry point function in the shader module to be used in this stage.

debug bool

Indicates whether the shader should be debuggable. This flag only has an effect if shaderBytes contains shader code that will be compiled.

Fields

Debug

Indicates whether the shader should be debuggable. This flag only has an effect if ShaderBytes contains shader code that will be compiled.

public bool Debug

Field Value

bool

EntryPoint

The name of the entry point function in the shader module to be used in this stage.

public string EntryPoint

Field Value

string

ShaderBytes

An array containing the raw shader bytes. For Direct3D11 shaders, this array must contain HLSL bytecode or HLSL text. For Vulkan shaders, this array must contain SPIR-V bytecode. For OpenGL and OpenGL ES shaders, this array must contain the ASCII-encoded text of the shader code.

public byte[] ShaderBytes

Field Value

byte[]

Stage

The shader stage this instance describes.

public ShaderStages Stage

Field Value

ShaderStages

Methods

Equals(ShaderDescription)

Element-wise equality.

public bool Equals(ShaderDescription other)

Parameters

other ShaderDescription

The instance to compare to.

Returns

bool

True if all elements and if array instances are equal; false otherswise.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.