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
stageShaderStagesThe shader stage to create.
shaderBytesbyte[]An array containing the raw shader bytes.
entryPointstringThe 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
stageShaderStagesThe shader stage to create.
shaderBytesbyte[]An array containing the raw shader bytes.
entryPointstringThe name of the entry point function in the shader module to be used in this stage.
debugboolIndicates whether the shader should be debuggable. This flag only has an effect if
shaderBytescontains 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
EntryPoint
The name of the entry point function in the shader module to be used in this stage.
public string EntryPoint
Field Value
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
Methods
Equals(ShaderDescription)
Element-wise equality.
public bool Equals(ShaderDescription other)
Parameters
otherShaderDescriptionThe 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.