reckfellENGINE

RDShaderSpirV

SPIR-V bytecode and per-stage diagnostics.

On this page
class RDShaderSpirVReckfellSharpInherits Resource

RDShaderSpirV contains stage bytes and errors. The object itself does not prove compilation succeeded: inspect the required stage error and bytecode presence. Then create a shader on a specific RenderingDevice.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

RDShaderSpirVConstructor
# RDShaderSpirV
C#
public RDShaderSpirV();

Creates a Resource with empty bytecode and an empty error string for every stage. Empty errors merely mean no recorded message: no stage has been compiled. The object is not a GPU RID.

Properties20

BytecodeAnyHitProperty
# BytecodeAnyHit
C#
public byte[] BytecodeAnyHit { get; set; }

SPIR-V bytes for any-hit: intersection-candidate processing, initially empty. The getter returns a byte[] copy; the setter stores without validation, clears no CompileErrorAnyHit and emits no Changed. A tessellation/ray field establishes no GPU support.

BytecodeClosestHitProperty
# BytecodeClosestHit
C#
public byte[] BytecodeClosestHit { get; set; }

SPIR-V bytes for closest-hit: closest-intersection processing, initially empty. The getter returns a byte[] copy; the setter stores without validation, clears no CompileErrorClosestHit and emits no Changed. A tessellation/ray field establishes no GPU support.

BytecodeComputeProperty
# BytecodeCompute
C#
public byte[] BytecodeCompute { get; set; }

Compute-stage SPIR-V bytes, not GLSL text or a ready pipeline RID. Inspect CompileErrorCompute before creating the GPU shader.

BytecodeFragmentProperty
# BytecodeFragment
C#
public byte[] BytecodeFragment { get; set; }

SPIR-V bytes for fragment: fragment output, initially empty. The getter returns a byte[] copy; the setter stores without validation, clears no CompileErrorFragment and emits no Changed. A tessellation/ray field establishes no GPU support.

BytecodeIntersectionProperty
# BytecodeIntersection
C#
public byte[] BytecodeIntersection { get; set; }

SPIR-V bytes for intersection: custom procedural-geometry intersection, initially empty. The getter returns a byte[] copy; the setter stores without validation, clears no CompileErrorIntersection and emits no Changed. A tessellation/ray field establishes no GPU support.

BytecodeMissProperty
# BytecodeMiss
C#
public byte[] BytecodeMiss { get; set; }

SPIR-V bytes for miss: processing a ray without a hit, initially empty. The getter returns a byte[] copy; the setter stores without validation, clears no CompileErrorMiss and emits no Changed. A tessellation/ray field establishes no GPU support.

BytecodeRaygenProperty
# BytecodeRaygen
C#
public byte[] BytecodeRaygen { get; set; }

SPIR-V bytes for ray generation: launching rays, initially empty. The getter returns a byte[] copy; the setter stores without validation, clears no CompileErrorRaygen and emits no Changed. A tessellation/ray field establishes no GPU support.

BytecodeTesselationControlProperty
# BytecodeTesselationControl
C#
public byte[] BytecodeTesselationControl { get; set; }

SPIR-V bytes for tessellation control: patch control, initially empty. The getter returns a byte[] copy; the setter stores without validation, clears no CompileErrorTesselationControl and emits no Changed. A tessellation/ray field establishes no GPU support.

BytecodeTesselationEvaluationProperty
# BytecodeTesselationEvaluation
C#
public byte[] BytecodeTesselationEvaluation { get; set; }

SPIR-V bytes for tessellation evaluation: evaluating a tessellated patch, initially empty. The getter returns a byte[] copy; the setter stores without validation, clears no CompileErrorTesselationEvaluation and emits no Changed. A tessellation/ray field establishes no GPU support.

BytecodeVertexProperty
# BytecodeVertex
C#
public byte[] BytecodeVertex { get; set; }

SPIR-V bytes for vertex: vertex processing, initially empty. The getter returns a byte[] copy; the setter stores without validation, clears no CompileErrorVertex and emits no Changed. A tessellation/ray field establishes no GPU support.

CompileErrorAnyHitProperty
# CompileErrorAnyHit
C#
public string CompileErrorAnyHit { get; set; }

Stored diagnostic for any-hit: intersection-candidate processing, initially empty. Empty does not prove compilation: also inspect BytecodeAnyHit. A manual write changes only the message and emits no Changed; it does not repair the shader.

CompileErrorClosestHitProperty
# CompileErrorClosestHit
C#
public string CompileErrorClosestHit { get; set; }

Stored diagnostic for closest-hit: closest-intersection processing, initially empty. Empty does not prove compilation: also inspect BytecodeClosestHit. A manual write changes only the message and emits no Changed; it does not repair the shader.

CompileErrorComputeProperty
# CompileErrorCompute
C#
public string CompileErrorCompute { get; set; }

Compute-stage compilation diagnostics. Inspect before ShaderCreateFromSpirV; a nonempty error means this result must not be used to create the shader. An empty string does not replace checking that the required bytecode exists.

CompileErrorFragmentProperty
# CompileErrorFragment
C#
public string CompileErrorFragment { get; set; }

Stored diagnostic for fragment: fragment output, initially empty. Empty does not prove compilation: also inspect BytecodeFragment. A manual write changes only the message and emits no Changed; it does not repair the shader.

CompileErrorIntersectionProperty
# CompileErrorIntersection
C#
public string CompileErrorIntersection { get; set; }

Stored diagnostic for intersection: custom procedural-geometry intersection, initially empty. Empty does not prove compilation: also inspect BytecodeIntersection. A manual write changes only the message and emits no Changed; it does not repair the shader.

CompileErrorMissProperty
# CompileErrorMiss
C#
public string CompileErrorMiss { get; set; }

Stored diagnostic for miss: processing a ray without a hit, initially empty. Empty does not prove compilation: also inspect BytecodeMiss. A manual write changes only the message and emits no Changed; it does not repair the shader.

CompileErrorRaygenProperty
# CompileErrorRaygen
C#
public string CompileErrorRaygen { get; set; }

Stored diagnostic for ray generation: launching rays, initially empty. Empty does not prove compilation: also inspect BytecodeRaygen. A manual write changes only the message and emits no Changed; it does not repair the shader.

CompileErrorTesselationControlProperty
# CompileErrorTesselationControl
C#
public string CompileErrorTesselationControl { get; set; }

Stored diagnostic for tessellation control: patch control, initially empty. Empty does not prove compilation: also inspect BytecodeTesselationControl. A manual write changes only the message and emits no Changed; it does not repair the shader.

CompileErrorTesselationEvaluationProperty
# CompileErrorTesselationEvaluation
C#
public string CompileErrorTesselationEvaluation { get; set; }

Stored diagnostic for tessellation evaluation: evaluating a tessellated patch, initially empty. Empty does not prove compilation: also inspect BytecodeTesselationEvaluation. A manual write changes only the message and emits no Changed; it does not repair the shader.

CompileErrorVertexProperty
# CompileErrorVertex
C#
public string CompileErrorVertex { get; set; }

Stored diagnostic for vertex: vertex processing, initially empty. Empty does not prove compilation: also inspect BytecodeVertex. A manual write changes only the message and emits no Changed; it does not repair the shader.

Methods5

GetStageBytecodebyte[]
# GetStageBytecode
C#
public byte[] GetStageBytecode(RenderingDevice.ShaderStage stage);

Returns the selected stage’s byte[], initially empty. A CPU-data copy: editing the returned array changes no resource and is not GPU readback. Bytes alone do not establish valid SPIR-V.

Parameters
NameTypeDefault
stageRenderingDevice.ShaderStage—
stage

Stage index, such as ShaderStage.Compute or ShaderStage.Vertex. Do not pass ComputeBit/VertexBit, a mask or Max: these are not the requested stage index and can select another stage or emit a native error.

Returns byte[]

Selected-stage byte[] copy; can be empty or contain manually stored invalid data.

GetStageCompileErrorstring
# GetStageCompileError
C#
public string GetStageCompileError(RenderingDevice.ShaderStage stage);

Returns the selected stage’s stored diagnostic, initially empty. Runs no compiler. Also check bytecode: an absent or new stage has an empty string too.

Parameters
NameTypeDefault
stageRenderingDevice.ShaderStage—
stage

Stage index, such as ShaderStage.Compute or ShaderStage.Vertex. Do not pass ComputeBit/VertexBit, a mask or Max: these are not the requested stage index and can select another stage or emit a native error.

Returns string

Stored message; an empty string alone does not establish successful compilation.

SetStageBytecode2 overloads
# SetStageBytecode · 1/2
C#
public void SetStageBytecode(RenderingDevice.ShaderStage stage, byte[] bytecode);

Stores a copy of one stage’s bytes; byte[] and ReadOnlySpan<byte> overloads are available. Validates no SPIR-V, compiles no source, clears no stage error and recreates no GPU shader. Emits no Resource.Changed. Supply a stage index, not a …Bit mask.

Parameters
NameTypeDefault
stageRenderingDevice.ShaderStage—
bytecodebyte[]—
stage

Stage index, such as ShaderStage.Compute or ShaderStage.Vertex. Do not pass ComputeBit/VertexBit, a mask or Max: these are not the requested stage index and can select another stage or emit a native error.

bytecode

Bytes or a span to copy into the stage slot. The setter validates no SPIR-V and clears no stage error.

# SetStageBytecode · 2/2
C#
public void SetStageBytecode(RenderingDevice.ShaderStage stage, ReadOnlySpan<byte> bytecode);

Stores a copy of one stage’s bytes; byte[] and ReadOnlySpan<byte> overloads are available. Validates no SPIR-V, compiles no source, clears no stage error and recreates no GPU shader. Emits no Resource.Changed. Supply a stage index, not a …Bit mask.

Parameters
NameTypeDefault
stageRenderingDevice.ShaderStage—
bytecodeReadOnlySpan<byte>—
stage

Stage index, such as ShaderStage.Compute or ShaderStage.Vertex. Do not pass ComputeBit/VertexBit, a mask or Max: these are not the requested stage index and can select another stage or emit a native error.

bytecode

Bytes or a span to copy into the stage slot. The setter validates no SPIR-V and clears no stage error.

SetStageCompileErrorvoid
# SetStageCompileError
C#
public void SetStageCompileError(RenderingDevice.ShaderStage stage, string compileError);

Stores a stage message independently of its bytes. An empty string clears only the diagnostic: it compiles nothing, restores no bytecode and does not repair invalid SPIR-V. Emits no Resource.Changed.

Parameters
NameTypeDefault
stageRenderingDevice.ShaderStage—
compileErrorstring—
stage

Stage index, such as ShaderStage.Compute or ShaderStage.Vertex. Do not pass ComputeBit/VertexBit, a mask or Max: these are not the requested stage index and can select another stage or emit a native error.

compileError

Diagnostic string; empty clears only the message and leaves bytecode unchanged.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.