Struct ShaderDescription
Describes a Shader, for creation using a ResourceFactory.
Implements
Inherited Members
Namespace: Veldrid
Assembly: cs.temp.dll.dll
Syntax
public struct ShaderDescription : IEquatable<ShaderDescription>
Constructors
ShaderDescription(ShaderStages, Byte[], String)
Constructs a new ShaderDescription.
Declaration
public ShaderDescription(ShaderStages stage, byte[] shaderBytes, string entryPoint)
Parameters
Type | Name | Description |
---|---|---|
ShaderStages | stage | The shader stage to create. |
System.Byte[] | shaderBytes | An array containing the raw shader bytes. |
System.String | entryPoint | The name of the entry point function in the shader module to be used in this stage. |
ShaderDescription(ShaderStages, Byte[], String, Boolean)
Constructs a new ShaderDescription.
Declaration
public ShaderDescription(ShaderStages stage, byte[] shaderBytes, string entryPoint, bool debug)
Parameters
Type | Name | Description |
---|---|---|
ShaderStages | stage | The shader stage to create. |
System.Byte[] | shaderBytes | An array containing the raw shader bytes. |
System.String | entryPoint | The name of the entry point function in the shader module to be used in this stage. |
System.Boolean | debug | Indicates whether the shader should be debuggable. This flag only has an effect if
|
Fields
Debug
Indicates whether the shader should be debuggable. This flag only has an effect if ShaderBytes contains shader code that will be compiled.
Declaration
public bool Debug
Field Value
Type | Description |
---|---|
System.Boolean |
EntryPoint
The name of the entry point function in the shader module to be used in this stage.
Declaration
public string EntryPoint
Field Value
Type | Description |
---|---|
System.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. For Metal shaders, this array must contain Metal bitcode (a "metallib" file), or UTF8-encoded Metal shading language text.
Declaration
public byte[] ShaderBytes
Field Value
Type | Description |
---|---|
System.Byte[] |
Stage
The shader stage this instance describes.
Declaration
public ShaderStages Stage
Field Value
Type | Description |
---|---|
ShaderStages |
Methods
Equals(ShaderDescription)
Element-wise equality.
Declaration
public bool Equals(ShaderDescription other)
Parameters
Type | Name | Description |
---|---|---|
ShaderDescription | other | The instance to compare to. |
Returns
Type | Description |
---|---|
System.Boolean | True if all elements and if array instances are equal; false otherswise. |
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A 32-bit signed integer that is the hash code for this instance. |