reckfellENGINE

RenderingDevice

Low-level device for GPU resources, commands and compute.

On this page
class RenderingDeviceReckfellSharpInherits ReckfellObject

RenderingDevice creates RID resources, records commands and manages data transfers. A local device is owned by its creating code; the engine global device is borrowed and must not be freed by user code. Respect the device thread, resource dependencies and synchronization order.

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

Methods182

Barriervoid · Deprecated
# Barrier
C#
public void Barrier(RenderingDevice.BarrierMask from = RenderingDevice.BarrierMask.AllBarriers, RenderingDevice.BarrierMask to = RenderingDevice.BarrierMask.AllBarriers);

This method does nothing.

Parameters
NameTypeDefault
fromRenderingDevice.BarrierMaskRenderingDevice.BarrierMask.AllBarriers
toRenderingDevice.BarrierMaskRenderingDevice.BarrierMask.AllBarriers
BlasBuildError
# BlasBuild
C#
public Error BlasBuild(Rid blas);

Builds the blas.

Parameters
NameTypeDefault
blasRid—
Returns Error
BlasCreateRid
# BlasCreate
C#
public Rid BlasCreate(Reckfell.Collections.Array<RDAccelerationStructureGeometry> geometries, RenderingDevice.AccelerationStructureFlagBits flags);

Creates a new Bottom-Level Acceleration Structure (BLAS). It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's RenderingDevice.FreeRid method.

Parameters
NameTypeDefault
geometriesReckfell.Collections.Array<RDAccelerationStructureGeometry>—
flagsRenderingDevice.AccelerationStructureFlagBits—
Returns Rid
BufferClear2 overloads
# BufferClear · 1/2
C#
public Error BufferClear(Rid buffer, uint offset, uint sizeBytes);

Clears the contents of the buffer, clearing size_bytes bytes, starting at offset. Prints an error if:

Parameters
NameTypeDefault
bufferRid—
offsetuint—
sizeBytesuint—
Returns Error
# BufferClear · 2/2
C#
public Error BufferClear(Rid buffer, uint offset, uint sizeBytes, RenderingDevice.BarrierMask postBarrier);

Clears the contents of the buffer, clearing size_bytes bytes, starting at offset. Prints an error if:

Parameters
NameTypeDefault
bufferRid—
offsetuint—
sizeBytesuint—
postBarrierRenderingDevice.BarrierMask—
Returns Error
BufferCopyError
# BufferCopy
C#
public Error BufferCopy(Rid srcBuffer, Rid dstBuffer, uint srcOffset, uint dstOffset, uint size);

Copies size bytes from the src_buffer at src_offset into dst_buffer at dst_offset. Prints an error if:

Parameters
NameTypeDefault
srcBufferRid—
dstBufferRid—
srcOffsetuint—
dstOffsetuint—
sizeuint—
Returns Error
BufferGetDatabyte[]
# BufferGetData
C#
public byte[] BufferGetData(Rid buffer, uint offsetBytes = 0, uint sizeBytes = 0);

Blocking buffer read into a new byte[] that waits for device work. Offset and size are bytes; sizeBytes=0 selects the full buffer size, not the remainder after an arbitrary offset. Specify the size explicitly for partial reads.

Parameters
NameTypeDefault
bufferRid—
offsetBytesuint0
sizeBytesuint0
buffer

Buffer RID from the same device.

offsetBytes

Starting byte offset. Specify sizeBytes explicitly when reading from a nonzero offset.

sizeBytes

Read size in bytes; 0 selects the full buffer size, not the remainder after offsetBytes.

Returns byte[]

Copy of the read bytes; this is a blocking read.

BufferGetDataAsyncError
# BufferGetDataAsync
C#
public Error BufferGetDataAsync(Rid buffer, Callable callback, uint offsetBytes = 0, uint sizeBytes = 0);

Asynchronous version of RenderingDevice.BufferGetData. RenderingDevice will call callback in a certain amount of frames with the data the buffer had at the time of the request. Note: At the moment, the delay corresponds to the amount of frames specified by ProjectSettings.rendering/rendering_device/vsync/frame_queue_size. Note: Downloading large buffers can have a prohibitive cost for real-time even when using the asynchronous method due to hardware bandwidth limitations. When dealing with large resources, you can adjust settings such as ProjectSettings.rendering/rendering_device/staging_buffer/block_size_kb to improve the transfer speed at the cost of extra memory.

Parameters
NameTypeDefault
bufferRid—
callbackCallable—
offsetBytesuint0
sizeBytesuint0
Returns Error
BufferGetDeviceAddressulong
# BufferGetDeviceAddress
C#
public ulong BufferGetDeviceAddress(Rid buffer);

Returns the address of the given buffer which can be passed to shaders in any way to access underlying data. Buffer must have been created with this feature enabled. Note: You must check that the GPU supports this functionality by calling RenderingDevice.HasFeature with RenderingDevice.Features.BufferDeviceAddress as a parameter.

Parameters
NameTypeDefault
bufferRid—
Returns ulong
BufferUpdate4 overloads
# BufferUpdate · 1/4
C#
public Error BufferUpdate(Rid buffer, uint offset, uint sizeBytes, byte[] data);

Writes sizeBytes bytes into the buffer at offset. Call outside an active compute/draw/raytracing list, provide enough source bytes and stay within the allocated buffer. These are not element counts.

Parameters
NameTypeDefault
bufferRid—
offsetuint—
sizeBytesuint—
databyte[]—
buffer

Buffer RID from the same device.

offset

Destination offset in bytes.

sizeBytes

Number of bytes to write; data must contain at least this many bytes.

data

Source bytes, not elements of an arbitrary width.

Returns Error

Error.Ok on successful update, otherwise an error code.

# BufferUpdate · 2/4
C#
public Error BufferUpdate(Rid buffer, uint offset, uint sizeBytes, byte[] data, RenderingDevice.BarrierMask postBarrier);

Updates a region of size_bytes bytes, starting at offset, in the buffer, with the specified data. Prints an error if:

Parameters
NameTypeDefault
bufferRid—
offsetuint—
sizeBytesuint—
databyte[]—
postBarrierRenderingDevice.BarrierMask—
Returns Error
# BufferUpdate · 3/4
C#
public Error BufferUpdate(Rid buffer, uint offset, uint sizeBytes, ReadOnlySpan<byte> data);

Updates a region of size_bytes bytes, starting at offset, in the buffer, with the specified data. Prints an error if:

Parameters
NameTypeDefault
bufferRid—
offsetuint—
sizeBytesuint—
dataReadOnlySpan<byte>—
Returns Error
# BufferUpdate · 4/4
C#
public Error BufferUpdate(Rid buffer, uint offset, uint sizeBytes, ReadOnlySpan<byte> data, RenderingDevice.BarrierMask postBarrier);

Updates a region of size_bytes bytes, starting at offset, in the buffer, with the specified data. Prints an error if:

Parameters
NameTypeDefault
bufferRid—
offsetuint—
sizeBytesuint—
dataReadOnlySpan<byte>—
postBarrierRenderingDevice.BarrierMask—
Returns Error
CaptureTimestampvoid
# CaptureTimestamp
C#
public void CaptureTimestamp(string name);

Creates a timestamp marker with the specified name. This is used for performance reporting with the RenderingDevice.GetCapturedTimestampCpuTime, RenderingDevice.GetCapturedTimestampGpuTime and RenderingDevice.GetCapturedTimestampName methods.

Parameters
NameTypeDefault
namestring—
ComputeListAddBarriervoid
# ComputeListAddBarrier
C#
public void ComputeListAddBarrier(long computeList);

Raises a Vulkan compute barrier in the specified compute_list.

Parameters
NameTypeDefault
computeListlong—
ComputeListBegin2 overloads
# ComputeListBegin · 1/2
C#
public long ComputeListBegin();

Begins recording a compute list on the device thread. Only one compute list can be active; after binding the pipeline and resources, finish recording with ComputeListEnd.

Returns long

Identifier for subsequent commands in the active list.

# ComputeListBegin · 2/2
C#
public long ComputeListBegin(bool allowDrawOverlap);

Starts a list of compute commands created with the compute_* methods. The returned value should be passed to other compute_list_* functions. Multiple compute lists cannot be created at the same time; you must finish the previous compute list first using RenderingDevice.ComputeListEnd. A simple compute operation might look like this (code is not a complete example):

Parameters
NameTypeDefault
allowDrawOverlapbool—
Returns long
ComputeListBindComputePipelinevoid
# ComputeListBindComputePipeline
C#
public void ComputeListBindComputePipeline(long computeList, Rid computePipeline);

Binds a same-device compute pipeline to the active list. Before dispatch also provide compatible resource sets and any parameters required by the shader.

Parameters
NameTypeDefault
computeListlong—
computePipelineRid—
computeList

Active compute-list identifier for this device.

computePipeline

Compatible compute-pipeline RID from the same device.

ComputeListBindUniformSetvoid
# ComputeListBindUniformSet
C#
public void ComputeListBindUniformSet(long computeList, Rid uniformSet, uint setIndex);

Binds a uniform set at the active compute pipeline set index. setIndex corresponds to GLSL set, not RDUniform.Binding; the layout must match the pipeline shader.

Parameters
NameTypeDefault
computeListlong—
uniformSetRid—
setIndexuint—
computeList

Active compute-list identifier for this device.

uniformSet

Uniform-set RID with a layout compatible with the pipeline shader.

setIndex

GLSL set index at which to bind the set.

ComputeListDispatchvoid
# ComputeListDispatch
C#
public void ComputeListDispatch(long computeList, uint xGroups, uint yGroups, uint zGroups);

Records dispatch of the specified workgroup counts, not individual threads. Counts must be positive and within device limits; guard indices in the shader for a partial final group.

Parameters
NameTypeDefault
computeListlong—
xGroupsuint—
yGroupsuint—
zGroupsuint—
computeList

Active compute-list identifier for this device.

xGroups

Positive X workgroup count within the device limit.

yGroups

Positive Y workgroup count within the device limit.

zGroups

Positive Z workgroup count within the device limit.

ComputeListDispatchIndirectvoid
# ComputeListDispatchIndirect
C#
public void ComputeListDispatchIndirect(long computeList, Rid buffer, uint offset);

Submits the compute list for processing on the GPU with the given group counts stored in the buffer at offset. Buffer must have been created with RenderingDevice.StorageBufferUsage.Indirect flag.

Parameters
NameTypeDefault
computeListlong—
bufferRid—
offsetuint—
ComputeListEnd2 overloads
# ComputeListEnd · 1/2
C#
public void ComputeListEnd();

Ends recording of the active compute list. This does not wait for GPU completion: a local device needs Submit and appropriate synchronization before CPU result use.

# ComputeListEnd · 2/2
C#
public void ComputeListEnd(RenderingDevice.BarrierMask postBarrier);

Finishes a list of compute commands created with the compute_* methods.

Parameters
NameTypeDefault
postBarrierRenderingDevice.BarrierMask—
ComputeListSetPushConstant2 overloads
# ComputeListSetPushConstant · 1/2
C#
public void ComputeListSetPushConstant(long computeList, byte[] buffer, uint sizeBytes);

Sets the push constant data to buffer for the specified compute_list. The shader determines how this binary data is used. The buffer's size in bytes must also be specified in size_bytes (this can be obtained by calling the PackedByteArray.size method on the passed buffer).

Parameters
NameTypeDefault
computeListlong—
bufferbyte[]—
sizeBytesuint—
# ComputeListSetPushConstant · 2/2
C#
public void ComputeListSetPushConstant(long computeList, ReadOnlySpan<byte> buffer, uint sizeBytes);

Sets the push constant data to buffer for the specified compute_list. The shader determines how this binary data is used. The buffer's size in bytes must also be specified in size_bytes (this can be obtained by calling the PackedByteArray.size method on the passed buffer).

Parameters
NameTypeDefault
computeListlong—
bufferReadOnlySpan<byte>—
sizeBytesuint—
ComputePipelineCreateRid
# ComputePipelineCreate
C#
public Rid ComputePipelineCreate(Rid shader, Reckfell.Collections.Array<RDPipelineSpecializationConstant> specializationConstants = null);

Creates a compute pipeline from a compute shader on the same device. A regular graphics shader is not suitable. The pipeline can be reused with compatible resource sets.

Parameters
NameTypeDefault
shaderRid—
specializationConstantsReckfell.Collections.Array<RDPipelineSpecializationConstant>null
shader

Same-device shader RID with the corresponding layout.

specializationConstants

Optional pipeline specialization-constant values.

Returns Rid

RID of the created device-owned resource; check validity.

ComputePipelineIsValidbool
# ComputePipelineIsValid
C#
public bool ComputePipelineIsValid(Rid computePipeline);

Returns true if the compute pipeline specified by the compute_pipeline RID is valid, false otherwise.

Parameters
NameTypeDefault
computePipelineRid—
Returns bool
CreateLocalDeviceRenderingDevice
# CreateLocalDevice
C#
public RenderingDevice CreateLocalDevice();

Create a new local RenderingDevice. This is most useful for performing compute operations on the GPU independently from the rest of the engine.

Returns RenderingDevice
DrawCommandBeginLabelvoid
# DrawCommandBeginLabel
C#
public void DrawCommandBeginLabel(string name, Color color);

Create a command buffer debug label region that can be displayed in third-party tools such as RenderDoc(https://renderdoc.org/). All regions must be ended with a RenderingDevice.DrawCommandEndLabel call. When viewed from the linear series of submissions to a single queue, calls to RenderingDevice.DrawCommandBeginLabel and RenderingDevice.DrawCommandEndLabel must be matched and balanced. The VK_EXT_DEBUG_UTILS_EXTENSION_NAME Vulkan extension must be available and enabled for command buffer debug label region to work. See also RenderingDevice.DrawCommandEndLabel.

Parameters
NameTypeDefault
namestring—
colorColor—
DrawCommandEndLabelvoid
# DrawCommandEndLabel
C#
public void DrawCommandEndLabel();

Ends the command buffer debug label region started by a RenderingDevice.DrawCommandBeginLabel call.

DrawCommandInsertLabelvoid · Deprecated
# DrawCommandInsertLabel
C#
public void DrawCommandInsertLabel(string name, Color color);

This method does nothing.

Parameters
NameTypeDefault
namestring—
colorColor—
DrawListBegin9 overloads
# DrawListBegin · 1/9
C#
public long DrawListBegin(Rid framebuffer, RenderingDevice.DrawFlags drawFlags = RenderingDevice.DrawFlags.DefaultAll, Color[] clearColorValues = null, float clearDepthValue = 1f, uint clearStencilValue = 0, Rect2? region = default, uint breadcrumb = 0);

Starts a list of raster drawing commands created with the draw_* methods. The returned value should be passed to other draw_list_* functions. Multiple draw lists cannot be created at the same time; you must finish the previous draw list first using RenderingDevice.DrawListEnd. A simple drawing operation might look like this (code is not a complete example):

The draw_flags indicates if the texture attachments of the framebuffer should be cleared or ignored. Only one of the two flags can be used for each individual attachment. Ignoring an attachment means that any contents that existed before the draw list will be completely discarded, reducing the memory bandwidth used by the render pass but producing garbage results if the pixels aren't replaced. The default behavior allows the engine to figure out the right operation to use if the texture is discardable, which can result in increased performance. See RDTextureFormat or RenderingDevice.TextureSetDiscardable. The breadcrumb parameter can be an arbitrary 32-bit integer that is useful to diagnose GPU crashes. If Reckfell is built in dev or debug mode; when the GPU crashes Reckfell will dump all shaders that were being executed at the time of the crash and the breadcrumb is useful to diagnose what passes did those shaders belong to. It does not affect rendering behavior and can be set to 0. It is recommended to use RenderingDevice.BreadcrumbMarker enumerations for consistency but it's not required. It is also possible to use bitwise operations to add extra data. e.g.

Text
rd.draw_list_begin(fb[i], RenderingDevice.CLEAR_COLOR_ALL, clear_colors, true, 1.0f, true, 0, Rect2(), RenderingDevice.OPAQUE_PASS | 5)
Parameters
NameTypeDefault
framebufferRid—
drawFlagsRenderingDevice.DrawFlagsRenderingDevice.DrawFlags.DefaultAll
clearColorValuesColor[]null
clearDepthValuefloat1f
clearStencilValueuint0
regionRect2?default
breadcrumbuint0
clearColorValues

If the parameter is null, then the default value is Array.Empty<Color>().

region

If the parameter is null, then the default value is new Rect2(new Vector2(0.0f, 0.0f), new Vector2(0.0f, 0.0f)).

Returns long
# DrawListBegin · 2/9
C#
public long DrawListBegin(Rid framebuffer, RenderingDevice.DrawFlags drawFlags, ReadOnlySpan<Color> clearColorValues, float clearDepthValue, uint clearStencilValue, Rect2? region, uint breadcrumb);

Starts a list of raster drawing commands created with the draw_* methods. The returned value should be passed to other draw_list_* functions. Multiple draw lists cannot be created at the same time; you must finish the previous draw list first using RenderingDevice.DrawListEnd. A simple drawing operation might look like this (code is not a complete example):

The draw_flags indicates if the texture attachments of the framebuffer should be cleared or ignored. Only one of the two flags can be used for each individual attachment. Ignoring an attachment means that any contents that existed before the draw list will be completely discarded, reducing the memory bandwidth used by the render pass but producing garbage results if the pixels aren't replaced. The default behavior allows the engine to figure out the right operation to use if the texture is discardable, which can result in increased performance. See RDTextureFormat or RenderingDevice.TextureSetDiscardable. The breadcrumb parameter can be an arbitrary 32-bit integer that is useful to diagnose GPU crashes. If Reckfell is built in dev or debug mode; when the GPU crashes Reckfell will dump all shaders that were being executed at the time of the crash and the breadcrumb is useful to diagnose what passes did those shaders belong to. It does not affect rendering behavior and can be set to 0. It is recommended to use RenderingDevice.BreadcrumbMarker enumerations for consistency but it's not required. It is also possible to use bitwise operations to add extra data. e.g.

Text
rd.draw_list_begin(fb[i], RenderingDevice.CLEAR_COLOR_ALL, clear_colors, true, 1.0f, true, 0, Rect2(), RenderingDevice.OPAQUE_PASS | 5)
Parameters
NameTypeDefault
framebufferRid—
drawFlagsRenderingDevice.DrawFlags—
clearColorValuesReadOnlySpan<Color>—
clearDepthValuefloat—
clearStencilValueuint—
regionRect2?—
breadcrumbuint—
region

If the parameter is null, then the default value is new Rect2(new Vector2(0.0f, 0.0f), new Vector2(0.0f, 0.0f)).

Returns long
# DrawListBegin · 3/9
C#
public long DrawListBegin(Rid framebuffer, RenderingDevice.InitialAction initialColorAction, RenderingDevice.FinalAction finalColorAction, RenderingDevice.InitialAction initialDepthAction, RenderingDevice.FinalAction finalDepthAction, Color[] clearColorValues, float clearDepth, uint clearStencil, Rect2? region);

Starts a list of raster drawing commands created with the draw_* methods. The returned value should be passed to other draw_list_* functions. Multiple draw lists cannot be created at the same time; you must finish the previous draw list first using RenderingDevice.DrawListEnd. A simple drawing operation might look like this (code is not a complete example):

The draw_flags indicates if the texture attachments of the framebuffer should be cleared or ignored. Only one of the two flags can be used for each individual attachment. Ignoring an attachment means that any contents that existed before the draw list will be completely discarded, reducing the memory bandwidth used by the render pass but producing garbage results if the pixels aren't replaced. The default behavior allows the engine to figure out the right operation to use if the texture is discardable, which can result in increased performance. See RDTextureFormat or RenderingDevice.TextureSetDiscardable. The breadcrumb parameter can be an arbitrary 32-bit integer that is useful to diagnose GPU crashes. If Reckfell is built in dev or debug mode; when the GPU crashes Reckfell will dump all shaders that were being executed at the time of the crash and the breadcrumb is useful to diagnose what passes did those shaders belong to. It does not affect rendering behavior and can be set to 0. It is recommended to use RenderingDevice.BreadcrumbMarker enumerations for consistency but it's not required. It is also possible to use bitwise operations to add extra data. e.g.

Text
rd.draw_list_begin(fb[i], RenderingDevice.CLEAR_COLOR_ALL, clear_colors, true, 1.0f, true, 0, Rect2(), RenderingDevice.OPAQUE_PASS | 5)
Parameters
NameTypeDefault
framebufferRid—
initialColorActionRenderingDevice.InitialAction—
finalColorActionRenderingDevice.FinalAction—
initialDepthActionRenderingDevice.InitialAction—
finalDepthActionRenderingDevice.FinalAction—
clearColorValuesColor[]—
clearDepthfloat—
clearStenciluint—
regionRect2?—
clearColorValues

If the parameter is null, then the default value is Array.Empty<Color>().

region

If the parameter is null, then the default value is new Rect2(new Vector2(0.0f, 0.0f), new Vector2(0.0f, 0.0f)).

Returns long
# DrawListBegin · 4/9
C#
public long DrawListBegin(Rid framebuffer, RenderingDevice.InitialAction initialColorAction, RenderingDevice.FinalAction finalColorAction, RenderingDevice.InitialAction initialDepthAction, RenderingDevice.FinalAction finalDepthAction, Color[] clearColorValues, float clearDepth, uint clearStencil, Rect2? region, Reckfell.Collections.Array storageTextures);

Starts a list of raster drawing commands created with the draw_* methods. The returned value should be passed to other draw_list_* functions. Multiple draw lists cannot be created at the same time; you must finish the previous draw list first using RenderingDevice.DrawListEnd. A simple drawing operation might look like this (code is not a complete example):

The draw_flags indicates if the texture attachments of the framebuffer should be cleared or ignored. Only one of the two flags can be used for each individual attachment. Ignoring an attachment means that any contents that existed before the draw list will be completely discarded, reducing the memory bandwidth used by the render pass but producing garbage results if the pixels aren't replaced. The default behavior allows the engine to figure out the right operation to use if the texture is discardable, which can result in increased performance. See RDTextureFormat or RenderingDevice.TextureSetDiscardable. The breadcrumb parameter can be an arbitrary 32-bit integer that is useful to diagnose GPU crashes. If Reckfell is built in dev or debug mode; when the GPU crashes Reckfell will dump all shaders that were being executed at the time of the crash and the breadcrumb is useful to diagnose what passes did those shaders belong to. It does not affect rendering behavior and can be set to 0. It is recommended to use RenderingDevice.BreadcrumbMarker enumerations for consistency but it's not required. It is also possible to use bitwise operations to add extra data. e.g.

Text
rd.draw_list_begin(fb[i], RenderingDevice.CLEAR_COLOR_ALL, clear_colors, true, 1.0f, true, 0, Rect2(), RenderingDevice.OPAQUE_PASS | 5)
Parameters
NameTypeDefault
framebufferRid—
initialColorActionRenderingDevice.InitialAction—
finalColorActionRenderingDevice.FinalAction—
initialDepthActionRenderingDevice.InitialAction—
finalDepthActionRenderingDevice.FinalAction—
clearColorValuesColor[]—
clearDepthfloat—
clearStenciluint—
regionRect2?—
storageTexturesReckfell.Collections.Array—
Returns long
# DrawListBegin · 5/9
C#
public long DrawListBegin(Rid framebuffer, RenderingDevice.InitialAction initialColorAction, RenderingDevice.FinalAction finalColorAction, RenderingDevice.InitialAction initialDepthAction, RenderingDevice.FinalAction finalDepthAction, Color[] clearColorValues, float clearDepth, uint clearStencil, Rect2? region, Reckfell.Collections.Array<Rid> storageTextures);

Starts a list of raster drawing commands created with the draw_* methods. The returned value should be passed to other draw_list_* functions. Multiple draw lists cannot be created at the same time; you must finish the previous draw list first using RenderingDevice.DrawListEnd. A simple drawing operation might look like this (code is not a complete example):

The draw_flags indicates if the texture attachments of the framebuffer should be cleared or ignored. Only one of the two flags can be used for each individual attachment. Ignoring an attachment means that any contents that existed before the draw list will be completely discarded, reducing the memory bandwidth used by the render pass but producing garbage results if the pixels aren't replaced. The default behavior allows the engine to figure out the right operation to use if the texture is discardable, which can result in increased performance. See RDTextureFormat or RenderingDevice.TextureSetDiscardable. The breadcrumb parameter can be an arbitrary 32-bit integer that is useful to diagnose GPU crashes. If Reckfell is built in dev or debug mode; when the GPU crashes Reckfell will dump all shaders that were being executed at the time of the crash and the breadcrumb is useful to diagnose what passes did those shaders belong to. It does not affect rendering behavior and can be set to 0. It is recommended to use RenderingDevice.BreadcrumbMarker enumerations for consistency but it's not required. It is also possible to use bitwise operations to add extra data. e.g.

Text
rd.draw_list_begin(fb[i], RenderingDevice.CLEAR_COLOR_ALL, clear_colors, true, 1.0f, true, 0, Rect2(), RenderingDevice.OPAQUE_PASS | 5)
Parameters
NameTypeDefault
framebufferRid—
initialColorActionRenderingDevice.InitialAction—
finalColorActionRenderingDevice.FinalAction—
initialDepthActionRenderingDevice.InitialAction—
finalDepthActionRenderingDevice.FinalAction—
clearColorValuesColor[]—
clearDepthfloat—
clearStenciluint—
regionRect2?—
storageTexturesReckfell.Collections.Array<Rid>—
clearColorValues

If the parameter is null, then the default value is Array.Empty<Color>().

region

If the parameter is null, then the default value is new Rect2(new Vector2(0.0f, 0.0f), new Vector2(0.0f, 0.0f)).

Returns long
# DrawListBegin · 6/9
C#
public long DrawListBegin(Rid framebuffer, RenderingDevice.InitialAction initialColorAction, RenderingDevice.FinalAction finalColorAction, RenderingDevice.InitialAction initialDepthAction, RenderingDevice.FinalAction finalDepthAction, Color[] clearColorValues, float clearDepth, uint clearStencil, Rect2? region, uint breadcrumb);

Starts a list of raster drawing commands created with the draw_* methods. The returned value should be passed to other draw_list_* functions. Multiple draw lists cannot be created at the same time; you must finish the previous draw list first using RenderingDevice.DrawListEnd. A simple drawing operation might look like this (code is not a complete example):

The draw_flags indicates if the texture attachments of the framebuffer should be cleared or ignored. Only one of the two flags can be used for each individual attachment. Ignoring an attachment means that any contents that existed before the draw list will be completely discarded, reducing the memory bandwidth used by the render pass but producing garbage results if the pixels aren't replaced. The default behavior allows the engine to figure out the right operation to use if the texture is discardable, which can result in increased performance. See RDTextureFormat or RenderingDevice.TextureSetDiscardable. The breadcrumb parameter can be an arbitrary 32-bit integer that is useful to diagnose GPU crashes. If Reckfell is built in dev or debug mode; when the GPU crashes Reckfell will dump all shaders that were being executed at the time of the crash and the breadcrumb is useful to diagnose what passes did those shaders belong to. It does not affect rendering behavior and can be set to 0. It is recommended to use RenderingDevice.BreadcrumbMarker enumerations for consistency but it's not required. It is also possible to use bitwise operations to add extra data. e.g.

Text
rd.draw_list_begin(fb[i], RenderingDevice.CLEAR_COLOR_ALL, clear_colors, true, 1.0f, true, 0, Rect2(), RenderingDevice.OPAQUE_PASS | 5)
Parameters
NameTypeDefault
framebufferRid—
initialColorActionRenderingDevice.InitialAction—
finalColorActionRenderingDevice.FinalAction—
initialDepthActionRenderingDevice.InitialAction—
finalDepthActionRenderingDevice.FinalAction—
clearColorValuesColor[]—
clearDepthfloat—
clearStenciluint—
regionRect2?—
breadcrumbuint—
clearColorValues

If the parameter is null, then the default value is Array.Empty<Color>().

region

If the parameter is null, then the default value is new Rect2(new Vector2(0.0f, 0.0f), new Vector2(0.0f, 0.0f)).

Returns long
# DrawListBegin · 7/9
C#
public long DrawListBegin(Rid framebuffer, RenderingDevice.InitialAction initialColorAction, RenderingDevice.FinalAction finalColorAction, RenderingDevice.InitialAction initialDepthAction, RenderingDevice.FinalAction finalDepthAction, ReadOnlySpan<Color> clearColorValues, float clearDepth, uint clearStencil, Rect2? region);

Starts a list of raster drawing commands created with the draw_* methods. The returned value should be passed to other draw_list_* functions. Multiple draw lists cannot be created at the same time; you must finish the previous draw list first using RenderingDevice.DrawListEnd. A simple drawing operation might look like this (code is not a complete example):

The draw_flags indicates if the texture attachments of the framebuffer should be cleared or ignored. Only one of the two flags can be used for each individual attachment. Ignoring an attachment means that any contents that existed before the draw list will be completely discarded, reducing the memory bandwidth used by the render pass but producing garbage results if the pixels aren't replaced. The default behavior allows the engine to figure out the right operation to use if the texture is discardable, which can result in increased performance. See RDTextureFormat or RenderingDevice.TextureSetDiscardable. The breadcrumb parameter can be an arbitrary 32-bit integer that is useful to diagnose GPU crashes. If Reckfell is built in dev or debug mode; when the GPU crashes Reckfell will dump all shaders that were being executed at the time of the crash and the breadcrumb is useful to diagnose what passes did those shaders belong to. It does not affect rendering behavior and can be set to 0. It is recommended to use RenderingDevice.BreadcrumbMarker enumerations for consistency but it's not required. It is also possible to use bitwise operations to add extra data. e.g.

Text
rd.draw_list_begin(fb[i], RenderingDevice.CLEAR_COLOR_ALL, clear_colors, true, 1.0f, true, 0, Rect2(), RenderingDevice.OPAQUE_PASS | 5)
Parameters
NameTypeDefault
framebufferRid—
initialColorActionRenderingDevice.InitialAction—
finalColorActionRenderingDevice.FinalAction—
initialDepthActionRenderingDevice.InitialAction—
finalDepthActionRenderingDevice.FinalAction—
clearColorValuesReadOnlySpan<Color>—
clearDepthfloat—
clearStenciluint—
regionRect2?—
region

If the parameter is null, then the default value is new Rect2(new Vector2(0.0f, 0.0f), new Vector2(0.0f, 0.0f)).

Returns long
# DrawListBegin · 8/9
C#
public long DrawListBegin(Rid framebuffer, RenderingDevice.InitialAction initialColorAction, RenderingDevice.FinalAction finalColorAction, RenderingDevice.InitialAction initialDepthAction, RenderingDevice.FinalAction finalDepthAction, ReadOnlySpan<Color> clearColorValues, float clearDepth, uint clearStencil, Rect2? region, Reckfell.Collections.Array<Rid> storageTextures);

Starts a list of raster drawing commands created with the draw_* methods. The returned value should be passed to other draw_list_* functions. Multiple draw lists cannot be created at the same time; you must finish the previous draw list first using RenderingDevice.DrawListEnd. A simple drawing operation might look like this (code is not a complete example):

The draw_flags indicates if the texture attachments of the framebuffer should be cleared or ignored. Only one of the two flags can be used for each individual attachment. Ignoring an attachment means that any contents that existed before the draw list will be completely discarded, reducing the memory bandwidth used by the render pass but producing garbage results if the pixels aren't replaced. The default behavior allows the engine to figure out the right operation to use if the texture is discardable, which can result in increased performance. See RDTextureFormat or RenderingDevice.TextureSetDiscardable. The breadcrumb parameter can be an arbitrary 32-bit integer that is useful to diagnose GPU crashes. If Reckfell is built in dev or debug mode; when the GPU crashes Reckfell will dump all shaders that were being executed at the time of the crash and the breadcrumb is useful to diagnose what passes did those shaders belong to. It does not affect rendering behavior and can be set to 0. It is recommended to use RenderingDevice.BreadcrumbMarker enumerations for consistency but it's not required. It is also possible to use bitwise operations to add extra data. e.g.

Text
rd.draw_list_begin(fb[i], RenderingDevice.CLEAR_COLOR_ALL, clear_colors, true, 1.0f, true, 0, Rect2(), RenderingDevice.OPAQUE_PASS | 5)
Parameters
NameTypeDefault
framebufferRid—
initialColorActionRenderingDevice.InitialAction—
finalColorActionRenderingDevice.FinalAction—
initialDepthActionRenderingDevice.InitialAction—
finalDepthActionRenderingDevice.FinalAction—
clearColorValuesReadOnlySpan<Color>—
clearDepthfloat—
clearStenciluint—
regionRect2?—
storageTexturesReckfell.Collections.Array<Rid>—
region

If the parameter is null, then the default value is new Rect2(new Vector2(0.0f, 0.0f), new Vector2(0.0f, 0.0f)).

Returns long
# DrawListBegin · 9/9
C#
public long DrawListBegin(Rid framebuffer, RenderingDevice.InitialAction initialColorAction, RenderingDevice.FinalAction finalColorAction, RenderingDevice.InitialAction initialDepthAction, RenderingDevice.FinalAction finalDepthAction, ReadOnlySpan<Color> clearColorValues, float clearDepth, uint clearStencil, Rect2? region, uint breadcrumb);

Starts a list of raster drawing commands created with the draw_* methods. The returned value should be passed to other draw_list_* functions. Multiple draw lists cannot be created at the same time; you must finish the previous draw list first using RenderingDevice.DrawListEnd. A simple drawing operation might look like this (code is not a complete example):

The draw_flags indicates if the texture attachments of the framebuffer should be cleared or ignored. Only one of the two flags can be used for each individual attachment. Ignoring an attachment means that any contents that existed before the draw list will be completely discarded, reducing the memory bandwidth used by the render pass but producing garbage results if the pixels aren't replaced. The default behavior allows the engine to figure out the right operation to use if the texture is discardable, which can result in increased performance. See RDTextureFormat or RenderingDevice.TextureSetDiscardable. The breadcrumb parameter can be an arbitrary 32-bit integer that is useful to diagnose GPU crashes. If Reckfell is built in dev or debug mode; when the GPU crashes Reckfell will dump all shaders that were being executed at the time of the crash and the breadcrumb is useful to diagnose what passes did those shaders belong to. It does not affect rendering behavior and can be set to 0. It is recommended to use RenderingDevice.BreadcrumbMarker enumerations for consistency but it's not required. It is also possible to use bitwise operations to add extra data. e.g.

Text
rd.draw_list_begin(fb[i], RenderingDevice.CLEAR_COLOR_ALL, clear_colors, true, 1.0f, true, 0, Rect2(), RenderingDevice.OPAQUE_PASS | 5)
Parameters
NameTypeDefault
framebufferRid—
initialColorActionRenderingDevice.InitialAction—
finalColorActionRenderingDevice.FinalAction—
initialDepthActionRenderingDevice.InitialAction—
finalDepthActionRenderingDevice.FinalAction—
clearColorValuesReadOnlySpan<Color>—
clearDepthfloat—
clearStenciluint—
regionRect2?—
breadcrumbuint—
region

If the parameter is null, then the default value is new Rect2(new Vector2(0.0f, 0.0f), new Vector2(0.0f, 0.0f)).

Returns long
DrawListBeginForScreenlong
# DrawListBeginForScreen
C#
public long DrawListBeginForScreen(int screen = 0, Color? clearColor = default);

High-level variant of RenderingDevice.DrawListBegin, with the parameters automatically being adjusted for drawing onto the window specified by the screen ID. Note: Cannot be used with local RenderingDevices, as these don't have a screen. If called on a local RenderingDevice, RenderingDevice.DrawListBeginForScreen returns RenderingDevice.InvalidId.

Parameters
NameTypeDefault
screenint0
clearColorColor?default
clearColor

If the parameter is null, then the default value is new Color(0.0f, 0.0f, 0.0f, 1.0f).

Returns long
DrawListBeginSplit2 overloads · Includes deprecated
# DrawListBeginSplit · 1/2
C#
public long[] DrawListBeginSplit(Rid framebuffer, uint splits, RenderingDevice.InitialAction initialColorAction, RenderingDevice.FinalAction finalColorAction, RenderingDevice.InitialAction initialDepthAction, RenderingDevice.FinalAction finalDepthAction, Color[] clearColorValues = null, float clearDepth = 1f, uint clearStencil = 0, Rect2? region = default, Reckfell.Collections.Array<Rid> storageTextures = null);

This method does nothing and always returns an empty long[].

Parameters
NameTypeDefault
framebufferRid—
splitsuint—
initialColorActionRenderingDevice.InitialAction—
finalColorActionRenderingDevice.FinalAction—
initialDepthActionRenderingDevice.InitialAction—
finalDepthActionRenderingDevice.FinalAction—
clearColorValuesColor[]null
clearDepthfloat1f
clearStenciluint0
regionRect2?default
storageTexturesReckfell.Collections.Array<Rid>null
clearColorValues

If the parameter is null, then the default value is Array.Empty<Color>().

region

If the parameter is null, then the default value is new Rect2(new Vector2(0.0f, 0.0f), new Vector2(0.0f, 0.0f)).

Returns long[]
# DrawListBeginSplit · 2/2
C#
public long[] DrawListBeginSplit(Rid framebuffer, uint splits, RenderingDevice.InitialAction initialColorAction, RenderingDevice.FinalAction finalColorAction, RenderingDevice.InitialAction initialDepthAction, RenderingDevice.FinalAction finalDepthAction, ReadOnlySpan<Color> clearColorValues, float clearDepth, uint clearStencil, Rect2? region, Reckfell.Collections.Array<Rid> storageTextures);

This method does nothing and always returns an empty long[].

Parameters
NameTypeDefault
framebufferRid—
splitsuint—
initialColorActionRenderingDevice.InitialAction—
finalColorActionRenderingDevice.FinalAction—
initialDepthActionRenderingDevice.InitialAction—
finalDepthActionRenderingDevice.FinalAction—
clearColorValuesReadOnlySpan<Color>—
clearDepthfloat—
clearStenciluint—
regionRect2?—
storageTexturesReckfell.Collections.Array<Rid>—
region

If the parameter is null, then the default value is new Rect2(new Vector2(0.0f, 0.0f), new Vector2(0.0f, 0.0f)).

Returns long[]
DrawListBindIndexArrayvoid
# DrawListBindIndexArray
C#
public void DrawListBindIndexArray(long drawList, Rid indexArray);

Binds index_array to the specified draw_list.

Parameters
NameTypeDefault
drawListlong—
indexArrayRid—
DrawListBindRenderPipelinevoid
# DrawListBindRenderPipeline
C#
public void DrawListBindRenderPipeline(long drawList, Rid renderPipeline);

Binds render_pipeline to the specified draw_list.

Parameters
NameTypeDefault
drawListlong—
renderPipelineRid—
DrawListBindUniformSetvoid
# DrawListBindUniformSet
C#
public void DrawListBindUniformSet(long drawList, Rid uniformSet, uint setIndex);

Binds uniform_set to the specified draw_list. A set_index must also be specified, which is an identifier starting from 0 that must match the one expected by the draw list.

Parameters
NameTypeDefault
drawListlong—
uniformSetRid—
setIndexuint—
DrawListBindVertexArrayvoid
# DrawListBindVertexArray
C#
public void DrawListBindVertexArray(long drawList, Rid vertexArray);

Binds vertex_array to the specified draw_list.

Parameters
NameTypeDefault
drawListlong—
vertexArrayRid—
DrawListBindVertexBuffersFormat2 overloads
# DrawListBindVertexBuffersFormat · 1/2
C#
public void DrawListBindVertexBuffersFormat(long drawList, long vertexFormat, uint vertexCount, Reckfell.Collections.Array<Rid> vertexBuffers, long[] offsets = null);

Binds a set of vertex_buffers directly to the specified draw_list using vertex_format without creating a vertex array RID. Provide the number of vertices in vertex_count; optional per-buffer byte offsets may also be supplied.

Parameters
NameTypeDefault
drawListlong—
vertexFormatlong—
vertexCountuint—
vertexBuffersReckfell.Collections.Array<Rid>—
offsetslong[]null
offsets

If the parameter is null, then the default value is Array.Empty<long>().

# DrawListBindVertexBuffersFormat · 2/2
C#
public void DrawListBindVertexBuffersFormat(long drawList, long vertexFormat, uint vertexCount, Reckfell.Collections.Array<Rid> vertexBuffers, ReadOnlySpan<long> offsets);

Binds a set of vertex_buffers directly to the specified draw_list using vertex_format without creating a vertex array RID. Provide the number of vertices in vertex_count; optional per-buffer byte offsets may also be supplied.

Parameters
NameTypeDefault
drawListlong—
vertexFormatlong—
vertexCountuint—
vertexBuffersReckfell.Collections.Array<Rid>—
offsetsReadOnlySpan<long>—
DrawListDisableScissorvoid
# DrawListDisableScissor
C#
public void DrawListDisableScissor(long drawList);

Removes and disables the scissor rectangle for the specified draw_list. See also RenderingDevice.DrawListEnableScissor.

Parameters
NameTypeDefault
drawListlong—
DrawListDrawvoid
# DrawListDraw
C#
public void DrawListDraw(long drawList, bool useIndices, uint instances, uint proceduralVertexCount = 0);

Submits draw_list for rendering on the GPU. This is the raster equivalent to RenderingDevice.ComputeListDispatch.

Parameters
NameTypeDefault
drawListlong—
useIndicesbool—
instancesuint—
proceduralVertexCountuint0
DrawListDrawIndirectvoid
# DrawListDrawIndirect
C#
public void DrawListDrawIndirect(long drawList, bool useIndices, Rid buffer, uint offset = 0, uint drawCount = 1, uint stride = 0);

Submits draw_list for rendering on the GPU with the given parameters stored in the buffer at offset. Parameters being integers: vertex count, instance count, first vertex, first instance. And when using indices: index count, instance count, first index, vertex offset, first instance. Buffer must have been created with RenderingDevice.StorageBufferUsage.Indirect flag.

Parameters
NameTypeDefault
drawListlong—
useIndicesbool—
bufferRid—
offsetuint0
drawCountuint1
strideuint0
DrawListEnableScissorvoid
# DrawListEnableScissor
C#
public void DrawListEnableScissor(long drawList, Rect2? rect = default);

Creates a scissor rectangle and enables it for the specified draw_list. Scissor rectangles are used for clipping by discarding fragments that fall outside a specified rectangular portion of the screen. See also RenderingDevice.DrawListDisableScissor. Note: The specified rect is automatically intersected with the screen's dimensions, which means it cannot exceed the screen's dimensions.

Parameters
NameTypeDefault
drawListlong—
rectRect2?default
rect

If the parameter is null, then the default value is new Rect2(new Vector2(0.0f, 0.0f), new Vector2(0.0f, 0.0f)).

DrawListEnd2 overloads
# DrawListEnd · 1/2
C#
public void DrawListEnd();

Finishes a list of raster drawing commands created with the draw_* methods.

# DrawListEnd · 2/2
C#
public void DrawListEnd(RenderingDevice.BarrierMask postBarrier);

Finishes a list of raster drawing commands created with the draw_* methods.

Parameters
NameTypeDefault
postBarrierRenderingDevice.BarrierMask—
DrawListSetBlendConstantsvoid
# DrawListSetBlendConstants
C#
public void DrawListSetBlendConstants(long drawList, Color color);

Sets blend constants for the specified draw_list to color. Blend constants are used only if the graphics pipeline is created with RenderingDevice.PipelineDynamicStateFlags.BlendConstants flag set.

Parameters
NameTypeDefault
drawListlong—
colorColor—
DrawListSetPushConstant2 overloads
# DrawListSetPushConstant · 1/2
C#
public void DrawListSetPushConstant(long drawList, byte[] buffer, uint sizeBytes);

Sets the push constant data to buffer for the specified draw_list. The shader determines how this binary data is used. The buffer's size in bytes must also be specified in size_bytes (this can be obtained by calling the PackedByteArray.size method on the passed buffer).

Parameters
NameTypeDefault
drawListlong—
bufferbyte[]—
sizeBytesuint—
# DrawListSetPushConstant · 2/2
C#
public void DrawListSetPushConstant(long drawList, ReadOnlySpan<byte> buffer, uint sizeBytes);

Sets the push constant data to buffer for the specified draw_list. The shader determines how this binary data is used. The buffer's size in bytes must also be specified in size_bytes (this can be obtained by calling the PackedByteArray.size method on the passed buffer).

Parameters
NameTypeDefault
drawListlong—
bufferReadOnlySpan<byte>—
sizeBytesuint—
DrawListSwitchToNextPasslong
# DrawListSwitchToNextPass
C#
public long DrawListSwitchToNextPass();

Switches to the next draw pass.

Returns long
DrawListSwitchToNextPassSplitlong[] · Deprecated
# DrawListSwitchToNextPassSplit
C#
public long[] DrawListSwitchToNextPassSplit(uint splits);

This method does nothing and always returns an empty long[].

Parameters
NameTypeDefault
splitsuint—
Returns long[]
FramebufferCreateRid
# FramebufferCreate
C#
public Rid FramebufferCreate(Reckfell.Collections.Array<Rid> textures, long validateWithFormat = -1, uint viewCount = 1);

Creates a new framebuffer. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's RenderingDevice.FreeRid method. This will be freed automatically when any of the textures is freed.

Parameters
NameTypeDefault
texturesReckfell.Collections.Array<Rid>—
validateWithFormatlong-1
viewCountuint1
Returns Rid
FramebufferCreateEmptyRid
# FramebufferCreateEmpty
C#
public Rid FramebufferCreateEmpty(Vector2I size, RenderingDevice.TextureSamples samples = RenderingDevice.TextureSamples.Samples1, long validateWithFormat = -1);

Creates a new empty framebuffer. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's RenderingDevice.FreeRid method.

Parameters
NameTypeDefault
sizeVector2I—
samplesRenderingDevice.TextureSamplesRenderingDevice.TextureSamples.Samples1
validateWithFormatlong-1
Returns Rid
FramebufferCreateMultipassRid
# FramebufferCreateMultipass
C#
public Rid FramebufferCreateMultipass(Reckfell.Collections.Array<Rid> textures, Reckfell.Collections.Array<RDFramebufferPass> passes, long validateWithFormat = -1, uint viewCount = 1);

Creates a new multipass framebuffer. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's RenderingDevice.FreeRid method. This will be freed automatically when any of the textures is freed.

Parameters
NameTypeDefault
texturesReckfell.Collections.Array<Rid>—
passesReckfell.Collections.Array<RDFramebufferPass>—
validateWithFormatlong-1
viewCountuint1
Returns Rid
FramebufferFormatCreatelong
# FramebufferFormatCreate
C#
public long FramebufferFormatCreate(Reckfell.Collections.Array<RDAttachmentFormat> attachments, uint viewCount = 1);

Creates a new framebuffer format with the specified attachments and view_count. Returns the new framebuffer's unique framebuffer format ID. If view_count is greater than or equal to 2, enables multiview which is used for VR rendering. This requires support for the Vulkan multiview extension.

Parameters
NameTypeDefault
attachmentsReckfell.Collections.Array<RDAttachmentFormat>—
viewCountuint1
Returns long
FramebufferFormatCreateEmptylong
# FramebufferFormatCreateEmpty
C#
public long FramebufferFormatCreateEmpty(RenderingDevice.TextureSamples samples = RenderingDevice.TextureSamples.Samples1);

Creates a new empty framebuffer format with the specified number of samples and returns its ID.

Parameters
NameTypeDefault
samplesRenderingDevice.TextureSamplesRenderingDevice.TextureSamples.Samples1
Returns long
FramebufferFormatCreateMultipasslong
# FramebufferFormatCreateMultipass
C#
public long FramebufferFormatCreateMultipass(Reckfell.Collections.Array<RDAttachmentFormat> attachments, Reckfell.Collections.Array<RDFramebufferPass> passes, uint viewCount = 1);

Creates a multipass framebuffer format with the specified attachments, passes and view_count and returns its ID. If view_count is greater than or equal to 2, enables multiview which is used for VR rendering. This requires support for the Vulkan multiview extension.

Parameters
NameTypeDefault
attachmentsReckfell.Collections.Array<RDAttachmentFormat>—
passesReckfell.Collections.Array<RDFramebufferPass>—
viewCountuint1
Returns long
FramebufferFormatGetTextureSamplesRenderingDevice.TextureSamples
# FramebufferFormatGetTextureSamples
C#
public RenderingDevice.TextureSamples FramebufferFormatGetTextureSamples(long format, uint renderPass = 0);

Returns the number of texture samples used for the given framebuffer format ID (returned by RenderingDevice.FramebufferGetFormat).

Parameters
NameTypeDefault
formatlong—
renderPassuint0
Returns RenderingDevice.TextureSamples
FramebufferGetFormatlong
# FramebufferGetFormat
C#
public long FramebufferGetFormat(Rid framebuffer);

Returns the format ID of the framebuffer specified by the framebuffer RID. This ID is guaranteed to be unique for the same formats and does not need to be freed.

Parameters
NameTypeDefault
framebufferRid—
Returns long
FramebufferIsValidbool
# FramebufferIsValid
C#
public bool FramebufferIsValid(Rid framebuffer);

Returns true if the framebuffer specified by the framebuffer RID is valid, false otherwise.

Parameters
NameTypeDefault
framebufferRid—
Returns bool
FreeRidvoid
# FreeRid
C#
public void FreeRid(Rid rid);

Frees a resource owned by this RenderingDevice. Respect dependencies and work completion; do not reuse the freed RID. A nonzero Rid.IsValid alone does not prove the resource still exists.

Parameters
NameTypeDefault
ridRid—
rid

Live resource RID owned by this device.

FullBarriervoid · Deprecated
# FullBarrier
C#
public void FullBarrier();

This method does nothing.

GetCapturedTimestampCpuTimeulong
# GetCapturedTimestampCpuTime
C#
public ulong GetCapturedTimestampCpuTime(uint index);

Returns the timestamp in CPU time for the rendering step specified by index (in microseconds since the engine started). See also RenderingDevice.GetCapturedTimestampGpuTime and RenderingDevice.CaptureTimestamp.

Parameters
NameTypeDefault
indexuint—
Returns ulong
GetCapturedTimestampGpuTimeulong
# GetCapturedTimestampGpuTime
C#
public ulong GetCapturedTimestampGpuTime(uint index);

Returns the timestamp in GPU time for the rendering step specified by index (in nanoseconds since the engine started). See also RenderingDevice.GetCapturedTimestampCpuTime and RenderingDevice.CaptureTimestamp.

Parameters
NameTypeDefault
indexuint—
Returns ulong
GetCapturedTimestampNamestring
# GetCapturedTimestampName
C#
public string GetCapturedTimestampName(uint index);

Returns the timestamp's name for the rendering step specified by index. See also RenderingDevice.CaptureTimestamp.

Parameters
NameTypeDefault
indexuint—
Returns string
GetCapturedTimestampsCountuint
# GetCapturedTimestampsCount
C#
public uint GetCapturedTimestampsCount();

Returns the total number of timestamps (rendering steps) available for profiling.

Returns uint
GetCapturedTimestampsFrameulong
# GetCapturedTimestampsFrame
C#
public ulong GetCapturedTimestampsFrame();

Returns the index of the last frame rendered that has rendering timestamps available for querying.

Returns ulong
GetDeviceAllocationCountulong
# GetDeviceAllocationCount
C#
public ulong GetDeviceAllocationCount();

Returns how many allocations the GPU has performed for internal driver structures. This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown.

Returns ulong
GetDeviceAllocsByObjectTypeulong
# GetDeviceAllocsByObjectType
C#
public ulong GetDeviceAllocsByObjectType(uint type);

Same as RenderingDevice.GetDeviceAllocationCount but filtered for a given object type. The type argument must be in range [RenderingDevice.GetTrackedObjectTypeCount`](/en/docs/api/renderingdevice#member-gettrackedobjecttypecount-6ea83230eb) is 0, then type argument is ignored and always returns 0. This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown.

Parameters
NameTypeDefault
typeuint—
Returns ulong
GetDeviceMemoryByObjectTypeulong
# GetDeviceMemoryByObjectType
C#
public ulong GetDeviceMemoryByObjectType(uint type);

Same as RenderingDevice.GetDeviceTotalMemory but filtered for a given object type. The type argument must be in range [RenderingDevice.GetTrackedObjectTypeCount`](/en/docs/api/renderingdevice#member-gettrackedobjecttypecount-6ea83230eb) is 0, then type argument is ignored and always returns 0. This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown.

Parameters
NameTypeDefault
typeuint—
Returns ulong
GetDeviceNamestring
# GetDeviceName
C#
public string GetDeviceName();

Returns the name of the video adapter (e.g. "GeForce GTX 1080/PCIe/SSE2"). Equivalent to RenderingServer.GetVideoAdapterName. See also RenderingDevice.GetDeviceVendorName.

Returns string
GetDevicePipelineCacheUuidstring
# GetDevicePipelineCacheUuid
C#
public string GetDevicePipelineCacheUuid();

Returns the universally unique identifier for the pipeline cache. This is used to cache shader files on disk, which avoids shader recompilations on subsequent engine runs. This UUID varies depending on the graphics card model, but also the driver version. Therefore, updating graphics drivers will invalidate the shader cache.

Returns string
GetDeviceTotalMemoryulong
# GetDeviceTotalMemory
C#
public ulong GetDeviceTotalMemory();

Returns how much bytes the GPU is using. This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown.

Returns ulong
GetDeviceVendorNamestring
# GetDeviceVendorName
C#
public string GetDeviceVendorName();

Returns the vendor of the video adapter (e.g. "NVIDIA Corporation"). Equivalent to RenderingServer.GetVideoAdapterVendor. See also RenderingDevice.GetDeviceName.

Returns string
GetDriverAllocationCountulong
# GetDriverAllocationCount
C#
public ulong GetDriverAllocationCount();

Returns how many allocations the GPU driver has performed for internal driver structures. This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown.

Returns ulong
GetDriverAllocsByObjectTypeulong
# GetDriverAllocsByObjectType
C#
public ulong GetDriverAllocsByObjectType(uint type);

Same as RenderingDevice.GetDriverAllocationCount but filtered for a given object type. The type argument must be in range [RenderingDevice.GetTrackedObjectTypeCount`](/en/docs/api/renderingdevice#member-gettrackedobjecttypecount-6ea83230eb) is 0, then type argument is ignored and always returns 0. This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown.

Parameters
NameTypeDefault
typeuint—
Returns ulong
GetDriverAndDeviceMemoryReportstring
GetDriverMemoryByObjectTypeulong
# GetDriverMemoryByObjectType
C#
public ulong GetDriverMemoryByObjectType(uint type);

Same as RenderingDevice.GetDriverTotalMemory but filtered for a given object type. The type argument must be in range [RenderingDevice.GetTrackedObjectTypeCount`](/en/docs/api/renderingdevice#member-gettrackedobjecttypecount-6ea83230eb) is 0, then type argument is ignored and always returns 0. This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown.

Parameters
NameTypeDefault
typeuint—
Returns ulong
GetDriverResourceulong
# GetDriverResource
C#
public ulong GetDriverResource(RenderingDevice.DriverResource resource, Rid rid, ulong index);

Returns the unique identifier of the driver resource for the specified rid. Some driver resource types ignore the specified rid. index is always ignored but must be specified anyway.

Parameters
NameTypeDefault
resourceRenderingDevice.DriverResource—
ridRid—
indexulong—
Returns ulong
GetDriverTotalMemoryulong
# GetDriverTotalMemory
C#
public ulong GetDriverTotalMemory();

Returns how much bytes the GPU driver is using for internal driver structures. This is only used by Vulkan in debug builds and can return 0 when this information is not tracked or unknown.

Returns ulong
GetFrameDelayuint
# GetFrameDelay
C#
public uint GetFrameDelay();

Returns the frame count kept by the graphics API. Higher values result in higher input lag, but with more consistent throughput. For the main RenderingDevice, frames are cycled (usually 3 with triple-buffered V-Sync enabled). However, local RenderingDevices only have 1 frame.

Returns uint
GetMemoryUsageulong
# GetMemoryUsage
C#
public ulong GetMemoryUsage(RenderingDevice.MemoryType type);

Returns the memory usage in bytes corresponding to the given type. When using Vulkan, these statistics are calculated by Vulkan Memory Allocator.

Parameters
NameTypeDefault
typeRenderingDevice.MemoryType—
Returns ulong
GetPerfReportstring
# GetPerfReport
C#
public string GetPerfReport();

Returns a string with a performance report from the past frame. Updates every frame.

Returns string
GetTrackedObjectNamestring
# GetTrackedObjectName
C#
public string GetTrackedObjectName(uint typeIndex);

Returns the name of the type of object for the given type_index. This value must be in range [RenderingDevice.GetTrackedObjectTypeCount](/en/docs/api/renderingdevice#member-gettrackedobjecttypecount-6ea83230eb) is 0, then type argument is ignored and always returns the same string. The return value is important because it gives meaning to the types passed to [RenderingDevice.GetDriverMemoryByObjectType](/en/docs/api/renderingdevice#member-getdrivermemorybyobjecttype-f8ed5453a7), [RenderingDevice.GetDriverAllocsByObjectType](/en/docs/api/renderingdevice#member-getdriverallocsbyobjecttype-0caddbe283), [RenderingDevice.GetDeviceMemoryByObjectType](/en/docs/api/renderingdevice#member-getdevicememorybyobjecttype-3861f5f55f), and [RenderingDevice.GetDeviceAllocsByObjectType`](/en/docs/api/renderingdevice#member-getdeviceallocsbyobjecttype-341591375f). Examples of strings it can return (not exhaustive):

  • DEVICE_MEMORY
  • PIPELINE_CACHE
  • SWAPCHAIN_KHR
  • COMMAND_POOL Thus if e.g. get_tracked_object_name(5) returns "COMMAND_POOL", then get_device_memory_by_object_type(5) returns the bytes used by the GPU for command pools. This is only used by Vulkan in debug builds. Reckfell must also be started with the --extra-gpu-memory-tracking command line argument.
Parameters
NameTypeDefault
typeIndexuint—
Returns string
GetTrackedObjectTypeCountulong
# GetTrackedObjectTypeCount
C#
public ulong GetTrackedObjectTypeCount();

Returns how many types of trackable objects there are. This is only used by Vulkan in debug builds. Reckfell must also be started with the --extra-gpu-memory-tracking command line argument.

Returns ulong
HasFeaturebool
# HasFeature
C#
public bool HasFeature(RenderingDevice.Features feature);

Returns true if the feature is supported by the GPU.

Parameters
NameTypeDefault
featureRenderingDevice.Features—
Returns bool
HitSbtCreateRid
# HitSbtCreate
C#
public Rid HitSbtCreate(Rid raytracingPipeline, uint initialHitGroupCapacity);

Creates a new hit shader binding table (SBT). It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's RenderingDevice.FreeRid method. This will be freed automatically when the raytracing_pipeline is freed. The hit SBT resizes itself as needed. initial_hit_group_capacity is used to allocate the initial backing memory.

Parameters
NameTypeDefault
raytracingPipelineRid—
initialHitGroupCapacityuint—
Returns Rid
HitSbtRangeAlloclong
# HitSbtRangeAlloc
C#
public long HitSbtRangeAlloc(Rid hitSbt, uint hitGroupCount);

Allocates a contiguous range of SBT entries from hit_sbt. The returned value should be assigned to RDAccelerationStructureInstance.HitSbtRange. During ray traversal, hit group index is computed as: (geometry index in RDAccelerationStructureInstance.Blas) × (SBT stride used in traceRayEXT)

  • (SBT offset used in traceRayEXT)
  • (range offset) hit_group_count must be large enough to cover all SBT entries that may be indexed by this equation. This typically corresponds to: (geometry count in RDAccelerationStructureInstance.Blas) × (SBT stride used in traceRayEXT) The allocated range is uninitialized and must be filled using RenderingDevice.HitSbtRangeUpdate.
Parameters
NameTypeDefault
hitSbtRid—
hitGroupCountuint—
Returns long
HitSbtRangeFreeError
# HitSbtRangeFree
C#
public Error HitSbtRangeFree(Rid hitSbt, long range);

Frees a hit SBT range previously allocated with RenderingDevice.HitSbtRangeAlloc. The range must not be in use by any acceleration structure after being freed.

Parameters
NameTypeDefault
hitSbtRid—
rangelong—
Returns Error
HitSbtRangeUpdate2 overloads
# HitSbtRangeUpdate · 1/2
C#
public Error HitSbtRangeUpdate(Rid hitSbt, long range, uint offset, int[] hitGroupIndices);

Updates the contents of a hit SBT range. hit_group_indices specifies indices into the hit group array provided in RenderingDevice.RaytracingPipelineCreate. The offset parameter specifies where within the allocated range the writing begins. This allows partial updates of a range. However, the complete range must be fully initialized before it is used in a raytracing dispatch.

Parameters
NameTypeDefault
hitSbtRid—
rangelong—
offsetuint—
hitGroupIndicesint[]—
Returns Error
# HitSbtRangeUpdate · 2/2
C#
public Error HitSbtRangeUpdate(Rid hitSbt, long range, uint offset, ReadOnlySpan<int> hitGroupIndices);

Updates the contents of a hit SBT range. hit_group_indices specifies indices into the hit group array provided in RenderingDevice.RaytracingPipelineCreate. The offset parameter specifies where within the allocated range the writing begins. This allows partial updates of a range. However, the complete range must be fully initialized before it is used in a raytracing dispatch.

Parameters
NameTypeDefault
hitSbtRid—
rangelong—
offsetuint—
hitGroupIndicesReadOnlySpan<int>—
Returns Error
HitSbtSetPipelineError
# HitSbtSetPipeline
C#
public Error HitSbtSetPipeline(Rid hitSbt, Rid raytracingPipeline);

Sets a new raytracing_pipeline for hit_sbt. The new pipeline must be a superset of the previous one. Existing hit groups must keep the same order and new hit groups should be appended to the end. This preserves existing SBT entries. The previous pipeline must remain valid during the call.

Parameters
NameTypeDefault
hitSbtRid—
raytracingPipelineRid—
Returns Error
IndexArrayCreateRid
# IndexArrayCreate
C#
public Rid IndexArrayCreate(Rid indexBuffer, uint indexOffset, uint indexCount);

Creates a new index array. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's RenderingDevice.FreeRid method. This will be freed automatically when the index_buffer is freed.

Parameters
NameTypeDefault
indexBufferRid—
indexOffsetuint—
indexCountuint—
Returns Rid
IndexBufferCreate4 overloads
# IndexBufferCreate · 1/4
C#
public Rid IndexBufferCreate(uint sizeIndices, RenderingDevice.IndexBufferFormat format, byte[] data, bool useRestartIndices);

Creates a new index buffer. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's RenderingDevice.FreeRid method.

Parameters
NameTypeDefault
sizeIndicesuint—
formatRenderingDevice.IndexBufferFormat—
databyte[]—
useRestartIndicesbool—
data

If the parameter is null, then the default value is Array.Empty<byte>().

Returns Rid
# IndexBufferCreate · 2/4
C#
public Rid IndexBufferCreate(uint sizeIndices, RenderingDevice.IndexBufferFormat format, byte[] data = null, bool useRestartIndices = false, RenderingDevice.BufferCreationBits creationBits = (RenderingDevice.BufferCreationBits)0);

Creates a new index buffer. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's RenderingDevice.FreeRid method.

Parameters
NameTypeDefault
sizeIndicesuint—
formatRenderingDevice.IndexBufferFormat—
databyte[]null
useRestartIndicesboolfalse
creationBitsRenderingDevice.BufferCreationBits(RenderingDevice.BufferCreationBits)0
data

If the parameter is null, then the default value is Array.Empty<byte>().

Returns Rid
# IndexBufferCreate · 3/4
C#
public Rid IndexBufferCreate(uint sizeIndices, RenderingDevice.IndexBufferFormat format, ReadOnlySpan<byte> data, bool useRestartIndices);

Creates a new index buffer. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's RenderingDevice.FreeRid method.

Parameters
NameTypeDefault
sizeIndicesuint—
formatRenderingDevice.IndexBufferFormat—
dataReadOnlySpan<byte>—
useRestartIndicesbool—
Returns Rid
# IndexBufferCreate · 4/4
C#
public Rid IndexBufferCreate(uint sizeIndices, RenderingDevice.IndexBufferFormat format, ReadOnlySpan<byte> data, bool useRestartIndices, RenderingDevice.BufferCreationBits creationBits);

Creates a new index buffer. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's RenderingDevice.FreeRid method.

Parameters
NameTypeDefault
sizeIndicesuint—
formatRenderingDevice.IndexBufferFormat—
dataReadOnlySpan<byte>—
useRestartIndicesbool—
creationBitsRenderingDevice.BufferCreationBits—
Returns Rid
LimitGetulong
# LimitGet
C#
public ulong LimitGet(RenderingDevice.Limit limit);

Queries a hardware limit of this device. For example, MaxTextureSize2D bounds a 2D texture dimension but does not guarantee a successful allocation at that size. Values depend on the device and driver; they are not remaining memory or one universal limit for all texture types.

Parameters
NameTypeDefault
limitRenderingDevice.Limit—
limit

Specific RenderingDevice.Limit entry. Select the corresponding limit for 2D, 3D, cube textures, layers or other resources.

Returns ulong

Numeric value of the selected device limit. Units depend on the enum entry; MaxTextureSize2D is the maximum side length in pixels.

RaytracingListBeginlong
# RaytracingListBegin
C#
public long RaytracingListBegin();

Starts a list of raytracing commands. The returned value should be passed to other raytracing_list_* functions. Multiple raytracing lists cannot be created at the same time; you must finish the previous raytracing list first using RenderingDevice.RaytracingListEnd. A simple raytracing operation might look like this (code is not a complete example):

Returns long
RaytracingListBindRaytracingPipelinevoid
# RaytracingListBindRaytracingPipeline
C#
public void RaytracingListBindRaytracingPipeline(long raytracingList, Rid raytracingPipeline);

Binds raytracing_pipeline to the specified raytracing_list.

Parameters
NameTypeDefault
raytracingListlong—
raytracingPipelineRid—
RaytracingListBindUniformSetvoid
# RaytracingListBindUniformSet
C#
public void RaytracingListBindUniformSet(long raytracingList, Rid uniformSet, uint setIndex);

Binds the uniform_set to this raytracing_list.

Parameters
NameTypeDefault
raytracingListlong—
uniformSetRid—
setIndexuint—
RaytracingListEndvoid
# RaytracingListEnd
C#
public void RaytracingListEnd();

Finishes a list of raytracing commands created with the raytracing_* methods.

RaytracingListSetPushConstant2 overloads
# RaytracingListSetPushConstant · 1/2
C#
public void RaytracingListSetPushConstant(long raytracingList, byte[] buffer, uint sizeBytes);

Sets the push constant data to buffer for the specified raytracing_list. The shader determines how this binary data is used. The buffer's size in bytes must also be specified in size_bytes (this can be obtained by calling the PackedByteArray.size method on the passed buffer).

Parameters
NameTypeDefault
raytracingListlong—
bufferbyte[]—
sizeBytesuint—
# RaytracingListSetPushConstant · 2/2
C#
public void RaytracingListSetPushConstant(long raytracingList, ReadOnlySpan<byte> buffer, uint sizeBytes);

Sets the push constant data to buffer for the specified raytracing_list. The shader determines how this binary data is used. The buffer's size in bytes must also be specified in size_bytes (this can be obtained by calling the PackedByteArray.size method on the passed buffer).

Parameters
NameTypeDefault
raytracingListlong—
bufferReadOnlySpan<byte>—
sizeBytesuint—
RaytracingListTraceRaysvoid
# RaytracingListTraceRays
C#
public void RaytracingListTraceRays(long raytracingList, uint raygenShaderIndex, Rid hitSbt, uint width, uint height, uint depth);

Initializes a raytracing dispatch for raytracing_list, launching width × height × depth rays. raygen_shader_index selects the ray generation shader from the pipeline bound with RenderingDevice.RaytracingListBindRaytracingPipeline. hit_sbt must use the same pipeline bound to raytracing_list.

Parameters
NameTypeDefault
raytracingListlong—
raygenShaderIndexuint—
hitSbtRid—
widthuint—
heightuint—
depthuint—
RaytracingPipelineCreateRid
# RaytracingPipelineCreate
C#
public Rid RaytracingPipelineCreate(Reckfell.Collections.Array<RDPipelineShader> raygenShaders, Reckfell.Collections.Array<RDPipelineShader> missShaders, Reckfell.Collections.Array<RDHitGroup> hitGroups, uint maxTraceRecursionDepth);

Creates a new raytracing pipeline. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's RenderingDevice.FreeRid method. Each shader must provide the required stage. All stages must use compatible pipeline layouts. The pipeline selects the required stage from each shader. Input order defines stable indices used by the API:

Parameters
NameTypeDefault
raygenShadersReckfell.Collections.Array<RDPipelineShader>—
missShadersReckfell.Collections.Array<RDPipelineShader>—
hitGroupsReckfell.Collections.Array<RDHitGroup>—
maxTraceRecursionDepthuint—
Returns Rid
RaytracingPipelineIsValidbool
# RaytracingPipelineIsValid
C#
public bool RaytracingPipelineIsValid(Rid raytracingPipeline);

Returns true if the raytracing pipeline specified by the raytracing_pipeline RID is valid, false otherwise.

Parameters
NameTypeDefault
raytracingPipelineRid—
Returns bool
RenderPipelineCreateRid
# RenderPipelineCreate
C#
public Rid RenderPipelineCreate(Rid shader, long framebufferFormat, long vertexFormat, RenderingDevice.RenderPrimitive primitive, RDPipelineRasterizationState rasterizationState, RDPipelineMultisampleState multisampleState, RDPipelineDepthStencilState stencilState, RDPipelineColorBlendState colorBlendState, RenderingDevice.PipelineDynamicStateFlags dynamicStateFlags = (RenderingDevice.PipelineDynamicStateFlags)0, uint forRenderPass = 0, Reckfell.Collections.Array<RDPipelineSpecializationConstant> specializationConstants = null);

Creates a new render pipeline. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's RenderingDevice.FreeRid method. This will be freed automatically when the shader is freed.

Parameters
NameTypeDefault
shaderRid—
framebufferFormatlong—
vertexFormatlong—
primitiveRenderingDevice.RenderPrimitive—
rasterizationStateRDPipelineRasterizationState—
multisampleStateRDPipelineMultisampleState—
stencilStateRDPipelineDepthStencilState—
colorBlendStateRDPipelineColorBlendState—
dynamicStateFlagsRenderingDevice.PipelineDynamicStateFlags(RenderingDevice.PipelineDynamicStateFlags)0
forRenderPassuint0
specializationConstantsReckfell.Collections.Array<RDPipelineSpecializationConstant>null
Returns Rid
RenderPipelineIsValidbool
# RenderPipelineIsValid
C#
public bool RenderPipelineIsValid(Rid renderPipeline);

Returns true if the render pipeline specified by the render_pipeline RID is valid, false otherwise.

Parameters
NameTypeDefault
renderPipelineRid—
Returns bool
SamplerCreateRid
# SamplerCreate
C#
public Rid SamplerCreate(RDSamplerState state);

Creates a new sampler. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's RenderingDevice.FreeRid method.

Parameters
NameTypeDefault
stateRDSamplerState—
Returns Rid
SamplerIsFormatSupportedForFilterbool
# SamplerIsFormatSupportedForFilter
C#
public bool SamplerIsFormatSupportedForFilter(RenderingDevice.DataFormat format, RenderingDevice.SamplerFilter samplerFilter);

Returns true if implementation supports using a texture of format with the given sampler_filter.

Parameters
NameTypeDefault
formatRenderingDevice.DataFormat—
samplerFilterRenderingDevice.SamplerFilter—
Returns bool
ScreenGetFramebufferFormat2 overloads
# ScreenGetFramebufferFormat · 1/2
C#
public long ScreenGetFramebufferFormat();

Returns the framebuffer format of the given screen. Note: Only the main RenderingDevice returned by RenderingServer.GetRenderingDevice has a format. If called on a local RenderingDevice, this method prints an error and returns RenderingDevice.InvalidId.

Returns long
# ScreenGetFramebufferFormat · 2/2
C#
public long ScreenGetFramebufferFormat(int screen = 0);

Returns the framebuffer format of the given screen. Note: Only the main RenderingDevice returned by RenderingServer.GetRenderingDevice has a format. If called on a local RenderingDevice, this method prints an error and returns RenderingDevice.InvalidId.

Parameters
NameTypeDefault
screenint0
Returns long
ScreenGetHeightint
# ScreenGetHeight
C#
public int ScreenGetHeight(int screen = 0);

Returns the window height matching the graphics API context for the given window ID (in pixels). Despite the parameter being named screen, this returns the window size. See also RenderingDevice.ScreenGetWidth. Note: Only the main RenderingDevice returned by RenderingServer.GetRenderingDevice has a height. If called on a local RenderingDevice, this method prints an error and returns RenderingDevice.InvalidId.

Parameters
NameTypeDefault
screenint0
Returns int
ScreenGetWidthint
# ScreenGetWidth
C#
public int ScreenGetWidth(int screen = 0);

Returns the window width matching the graphics API context for the given window ID (in pixels). Despite the parameter being named screen, this returns the window size. See also RenderingDevice.ScreenGetHeight. Note: Only the main RenderingDevice returned by RenderingServer.GetRenderingDevice has a width. If called on a local RenderingDevice, this method prints an error and returns RenderingDevice.InvalidId.

Parameters
NameTypeDefault
screenint0
Returns int
SetResourceNamevoid
# SetResourceName
C#
public void SetResourceName(Rid id, string name);

Sets the resource name for id to name. This is used for debugging with third-party tools such as RenderDoc(https://renderdoc.org/). The following types of resources can be named: texture, sampler, vertex buffer, index buffer, uniform buffer, texture buffer, storage buffer, uniform set buffer, shader, render pipeline and compute pipeline. Framebuffers cannot be named. Attempting to name an incompatible resource type will print an error. Note: Resource names are only set when the engine runs in verbose mode (OS.IsStdOutVerbose = true), or when using an engine build compiled with the dev_mode=yes SCons option. The graphics driver must also support the VK_EXT_DEBUG_UTILS_EXTENSION_NAME Vulkan extension for named resources to work.

Parameters
NameTypeDefault
idRid—
namestring—
ShaderCompileBinaryFromSpirVbyte[]
# ShaderCompileBinaryFromSpirV
C#
public byte[] ShaderCompileBinaryFromSpirV(RDShaderSpirV spirVData, string name = "");

Compiles a binary shader from spirv_data and returns the compiled binary data as a byte[]. This compiled shader is specific to the GPU model and driver version used; it will not work on different GPU models or even different driver versions. See also RenderingDevice.ShaderCompileSpirVFromSource. name is an optional human-readable name that can be given to the compiled shader for organizational purposes.

Parameters
NameTypeDefault
spirVDataRDShaderSpirV—
namestring""
Returns byte[]
ShaderCompileSpirVFromSourceRDShaderSpirV
# ShaderCompileSpirVFromSource
C#
public RDShaderSpirV ShaderCompileSpirVFromSource(RDShaderSource shaderSource, bool allowCache = true);

Compiles nonempty RDShaderSource stages into SPIR-V. The result contains per-stage errors: inspect CompileErrorCompute before creating a compute shader. SourceCompute takes raw GLSL, not the #[compute] import marker.

Parameters
NameTypeDefault
shaderSourceRDShaderSource—
allowCachebooltrue
shaderSource

Stage sources with the chosen language. SourceCompute takes raw GLSL.

allowCache

Allow the compilation cache. Result errors must still be inspected.

Returns RDShaderSpirV

Bytecode object containing per-stage data and errors.

ShaderCreateFromBytecode4 overloads
# ShaderCreateFromBytecode · 1/4
C#
public Rid ShaderCreateFromBytecode(byte[] binaryData);

Creates a new shader instance from a binary compiled shader. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's RenderingDevice.FreeRid method. See also RenderingDevice.ShaderCompileBinaryFromSpirV and RenderingDevice.ShaderCreateFromSpirV.

Parameters
NameTypeDefault
binaryDatabyte[]—
Returns Rid
# ShaderCreateFromBytecode · 2/4
C#
public Rid ShaderCreateFromBytecode(byte[] binaryData, Rid placeholderRid = default);

Creates a new shader instance from a binary compiled shader. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's RenderingDevice.FreeRid method. See also RenderingDevice.ShaderCompileBinaryFromSpirV and RenderingDevice.ShaderCreateFromSpirV.

Parameters
NameTypeDefault
binaryDatabyte[]—
placeholderRidRiddefault
Returns Rid
# ShaderCreateFromBytecode · 3/4
C#
public Rid ShaderCreateFromBytecode(ReadOnlySpan<byte> binaryData);

Creates a new shader instance from a binary compiled shader. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's RenderingDevice.FreeRid method. See also RenderingDevice.ShaderCompileBinaryFromSpirV and RenderingDevice.ShaderCreateFromSpirV.

Parameters
NameTypeDefault
binaryDataReadOnlySpan<byte>—
Returns Rid
# ShaderCreateFromBytecode · 4/4
C#
public Rid ShaderCreateFromBytecode(ReadOnlySpan<byte> binaryData, Rid placeholderRid);

Creates a new shader instance from a binary compiled shader. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's RenderingDevice.FreeRid method. See also RenderingDevice.ShaderCompileBinaryFromSpirV and RenderingDevice.ShaderCreateFromSpirV.

Parameters
NameTypeDefault
binaryDataReadOnlySpan<byte>—
placeholderRidRid—
Returns Rid
ShaderCreateFromSpirVRid
# ShaderCreateFromSpirV
C#
public Rid ShaderCreateFromSpirV(RDShaderSpirV spirVData, string name = "");

Creates a device-owned shader RID from SPIR-V without compilation errors. An RDShaderSpirV object alone does not prove success; inspect stage errors and the returned RID.

Parameters
NameTypeDefault
spirVDataRDShaderSpirV—
namestring""
spirVData

Stage bytecode without compilation errors.

name

Optional shader diagnostic name.

Returns Rid

RID of the created device-owned resource; check validity.

ShaderCreatePlaceholderRid
# ShaderCreatePlaceholder
C#
public Rid ShaderCreatePlaceholder();

Create a placeholder RID by allocating an RID without initializing it for use in RenderingDevice.ShaderCreateFromBytecode. This allows you to create an RID for a shader and pass it around, but defer compiling the shader to a later time.

Returns Rid
ShaderGetVertexInputAttributeMaskulong
# ShaderGetVertexInputAttributeMask
C#
public ulong ShaderGetVertexInputAttributeMask(Rid shader);

Returns the internal vertex input mask. Internally, the vertex input mask is an unsigned integer consisting of the locations (specified in GLSL via. layout(location = ...)) of the input variables (specified in GLSL by the in keyword).

Parameters
NameTypeDefault
shaderRid—
Returns ulong
StorageBufferCreate4 overloads
# StorageBufferCreate · 1/4
C#
public Rid StorageBufferCreate(uint sizeBytes, byte[] data, RenderingDevice.StorageBufferUsage usage);

Creates a storage buffer with the specified data and usage. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's RenderingDevice.FreeRid method.

Parameters
NameTypeDefault
sizeBytesuint—
databyte[]—
usageRenderingDevice.StorageBufferUsage—
data

If the parameter is null, then the default value is Array.Empty<byte>().

Returns Rid
# StorageBufferCreate · 2/4
C#
public Rid StorageBufferCreate(uint sizeBytes, byte[] data = null, RenderingDevice.StorageBufferUsage usage = (RenderingDevice.StorageBufferUsage)0, RenderingDevice.BufferCreationBits creationBits = (RenderingDevice.BufferCreationBits)0);

Creates a storage buffer owned by this device. Nonempty initial data must contain exactly sizeBytes bytes. Check the returned RID and free it through the same device after use.

Parameters
NameTypeDefault
sizeBytesuint—
databyte[]null
usageRenderingDevice.StorageBufferUsage(RenderingDevice.StorageBufferUsage)0
creationBitsRenderingDevice.BufferCreationBits(RenderingDevice.BufferCreationBits)0
sizeBytes

Total buffer size in bytes; nonempty data must have the same length.

data

Source bytes, not elements of an arbitrary width.

usage

Storage-buffer usage flags; 0 for the basic example.

creationBits

Additional buffer creation flags; 0 for the basic example.

Returns Rid

RID of the created device-owned resource; check validity.

# StorageBufferCreate · 3/4
C#
public Rid StorageBufferCreate(uint sizeBytes, ReadOnlySpan<byte> data, RenderingDevice.StorageBufferUsage usage);

Creates a storage buffer with the specified data and usage. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's RenderingDevice.FreeRid method.

Parameters
NameTypeDefault
sizeBytesuint—
dataReadOnlySpan<byte>—
usageRenderingDevice.StorageBufferUsage—
Returns Rid
# StorageBufferCreate · 4/4
C#
public Rid StorageBufferCreate(uint sizeBytes, ReadOnlySpan<byte> data, RenderingDevice.StorageBufferUsage usage, RenderingDevice.BufferCreationBits creationBits);

Creates a storage buffer with the specified data and usage. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's RenderingDevice.FreeRid method.

Parameters
NameTypeDefault
sizeBytesuint—
dataReadOnlySpan<byte>—
usageRenderingDevice.StorageBufferUsage—
creationBitsRenderingDevice.BufferCreationBits—
Returns Rid
Submitvoid
# Submit
C#
public void Submit();

Submits local RenderingDevice work to the GPU. Not for the engine global device; Sync is required before the next submission on that local device.

Syncvoid
# Sync
C#
public void Sync();

Waits for the local device previous Submit and completes its processing cycle. Blocks the caller; do not call before Submit or on the engine global device.

TextureBufferCreate2 overloads
# TextureBufferCreate · 1/2
C#
public Rid TextureBufferCreate(uint sizeBytes, RenderingDevice.DataFormat format, byte[] data = null);

Creates a new texture buffer. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's RenderingDevice.FreeRid method.

Parameters
NameTypeDefault
sizeBytesuint—
formatRenderingDevice.DataFormat—
databyte[]null
data

If the parameter is null, then the default value is Array.Empty<byte>().

Returns Rid
# TextureBufferCreate · 2/2
C#
public Rid TextureBufferCreate(uint sizeBytes, RenderingDevice.DataFormat format, ReadOnlySpan<byte> data);

Creates a new texture buffer. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's RenderingDevice.FreeRid method.

Parameters
NameTypeDefault
sizeBytesuint—
formatRenderingDevice.DataFormat—
dataReadOnlySpan<byte>—
Returns Rid
TextureClear2 overloads
# TextureClear · 1/2
C#
public Error TextureClear(Rid texture, Color color, uint baseMipmap, uint mipmapCount, uint baseLayer, uint layerCount);

Clears the specified texture by replacing all of its pixels with the specified color. base_mipmap and mipmap_count determine which mipmaps of the texture are affected by this clear operation, while base_layer and layer_count determine which layers of a 3D texture (or texture array) are affected by this clear operation. For 2D textures (which only have one layer by design), base_layer must be 0 and layer_count must be 1. Note: texture can't be cleared while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to RenderingDevice.FinalAction.Continue) to clear this texture.

Parameters
NameTypeDefault
textureRid—
colorColor—
baseMipmapuint—
mipmapCountuint—
baseLayeruint—
layerCountuint—
Returns Error
# TextureClear · 2/2
C#
public Error TextureClear(Rid texture, Color color, uint baseMipmap, uint mipmapCount, uint baseLayer, uint layerCount, RenderingDevice.BarrierMask postBarrier);

Clears the specified texture by replacing all of its pixels with the specified color. base_mipmap and mipmap_count determine which mipmaps of the texture are affected by this clear operation, while base_layer and layer_count determine which layers of a 3D texture (or texture array) are affected by this clear operation. For 2D textures (which only have one layer by design), base_layer must be 0 and layer_count must be 1. Note: texture can't be cleared while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to RenderingDevice.FinalAction.Continue) to clear this texture.

Parameters
NameTypeDefault
textureRid—
colorColor—
baseMipmapuint—
mipmapCountuint—
baseLayeruint—
layerCountuint—
postBarrierRenderingDevice.BarrierMask—
Returns Error
TextureCopy2 overloads
# TextureCopy · 1/2
C#
public Error TextureCopy(Rid fromTexture, Rid toTexture, Vector3 fromPos, Vector3 toPos, Vector3 size, uint srcMipmap, uint dstMipmap, uint srcLayer, uint dstLayer);

Copies the from_texture to to_texture with the specified from_pos, to_pos and size coordinates. For 2-dimensional textures, from_pos and to_pos must have a Z axis of 0, and size must have a Z axis of 1. Source and destination mipmaps/layers must also be specified, with these parameters being 0 for textures without mipmaps or single-layer textures. Returns Error.Ok if the texture copy was successful or Error.InvalidParameter otherwise. Note: from_texture texture can't be copied while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to RenderingDevice.FinalAction.Continue) to copy this texture. Note: from_texture texture requires the RenderingDevice.TextureUsageBits.CanCopyFromBit to be retrieved. Note: to_texture can't be copied while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to RenderingDevice.FinalAction.Continue) to copy this texture. Note: to_texture requires the RenderingDevice.TextureUsageBits.CanCopyToBit to be retrieved. Note: from_texture and to_texture must be of the same type (color or depth).

Parameters
NameTypeDefault
fromTextureRid—
toTextureRid—
fromPosVector3—
toPosVector3—
sizeVector3—
srcMipmapuint—
dstMipmapuint—
srcLayeruint—
dstLayeruint—
Returns Error
# TextureCopy · 2/2
C#
public Error TextureCopy(Rid fromTexture, Rid toTexture, Vector3 fromPos, Vector3 toPos, Vector3 size, uint srcMipmap, uint dstMipmap, uint srcLayer, uint dstLayer, RenderingDevice.BarrierMask postBarrier);

Copies the from_texture to to_texture with the specified from_pos, to_pos and size coordinates. For 2-dimensional textures, from_pos and to_pos must have a Z axis of 0, and size must have a Z axis of 1. Source and destination mipmaps/layers must also be specified, with these parameters being 0 for textures without mipmaps or single-layer textures. Returns Error.Ok if the texture copy was successful or Error.InvalidParameter otherwise. Note: from_texture texture can't be copied while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to RenderingDevice.FinalAction.Continue) to copy this texture. Note: from_texture texture requires the RenderingDevice.TextureUsageBits.CanCopyFromBit to be retrieved. Note: to_texture can't be copied while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to RenderingDevice.FinalAction.Continue) to copy this texture. Note: to_texture requires the RenderingDevice.TextureUsageBits.CanCopyToBit to be retrieved. Note: from_texture and to_texture must be of the same type (color or depth).

Parameters
NameTypeDefault
fromTextureRid—
toTextureRid—
fromPosVector3—
toPosVector3—
sizeVector3—
srcMipmapuint—
dstMipmapuint—
srcLayeruint—
dstLayeruint—
postBarrierRenderingDevice.BarrierMask—
Returns Error
TextureCreateRid
# TextureCreate
C#
public Rid TextureCreate(RDTextureFormat format, RDTextureView view, Reckfell.Collections.Array<byte[]> data = null);

Creates a new texture. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's RenderingDevice.FreeRid method. Note: data takes an Reckfell.Collections.Array of byte[]s. For RenderingDevice.TextureType.Type1D, RenderingDevice.TextureType.Type2D, and RenderingDevice.TextureType.Type3D types, this array should only have one element, a byte[] containing all the data for the texture. For _ARRAY and _CUBE types, the length should be the same as the number of RDTextureFormat.ArrayLayers in format. Note: Not to be confused with RenderingServer.Texture2DCreate, which creates the Reckfell-specific Texture2D resource as opposed to the graphics API's own texture type.

Parameters
NameTypeDefault
formatRDTextureFormat—
viewRDTextureView—
dataReckfell.Collections.Array<byte[]>null
Returns Rid
TextureCreateFromExtension2 overloads
# TextureCreateFromExtension · 1/2
C#
public Rid TextureCreateFromExtension(RenderingDevice.TextureType type, RenderingDevice.DataFormat format, RenderingDevice.TextureSamples samples, RenderingDevice.TextureUsageBits usageFlags, ulong image, ulong width, ulong height, ulong depth, ulong layers);

Returns an RID for an existing image (VkImage) with the given type, format, samples, usage_flags, width, height, depth, layers, and mipmaps. This can be used to allow Reckfell to render onto foreign images.

Parameters
NameTypeDefault
typeRenderingDevice.TextureType—
formatRenderingDevice.DataFormat—
samplesRenderingDevice.TextureSamples—
usageFlagsRenderingDevice.TextureUsageBits—
imageulong—
widthulong—
heightulong—
depthulong—
layersulong—
Returns Rid
# TextureCreateFromExtension · 2/2
C#
public Rid TextureCreateFromExtension(RenderingDevice.TextureType type, RenderingDevice.DataFormat format, RenderingDevice.TextureSamples samples, RenderingDevice.TextureUsageBits usageFlags, ulong image, ulong width, ulong height, ulong depth, ulong layers, ulong mipmaps = 1);

Returns an RID for an existing image (VkImage) with the given type, format, samples, usage_flags, width, height, depth, layers, and mipmaps. This can be used to allow Reckfell to render onto foreign images.

Parameters
NameTypeDefault
typeRenderingDevice.TextureType—
formatRenderingDevice.DataFormat—
samplesRenderingDevice.TextureSamples—
usageFlagsRenderingDevice.TextureUsageBits—
imageulong—
widthulong—
heightulong—
depthulong—
layersulong—
mipmapsulong1
Returns Rid
TextureCreateSharedRid
# TextureCreateShared
C#
public Rid TextureCreateShared(RDTextureView view, Rid withTexture);

Creates a shared texture using the specified view and the texture information from with_texture. This will be freed automatically when the with_texture is freed.

Parameters
NameTypeDefault
viewRDTextureView—
withTextureRid—
Returns Rid
TextureCreateSharedFromSlice2 overloads
# TextureCreateSharedFromSlice · 1/2
C#
public Rid TextureCreateSharedFromSlice(RDTextureView view, Rid withTexture, uint layer, uint mipmap, uint mipmaps, RenderingDevice.TextureSliceType sliceType);

Creates a shared texture using the specified view and the texture information from with_texture's layer and mipmap. The number of included mipmaps from the original texture can be controlled using the mipmaps parameter. The layers parameter controls the number of included layers from the original texture for 2D texture arrays, and must be 0 for all other texture types. If layers is 0 for a 2D texture array, layer must also be 0, and all available layers will be included. Only relevant for textures with multiple layers, such as 3D textures, texture arrays and cubemaps. For single-layer textures, use RenderingDevice.TextureCreateShared. For 2D textures (which only have one layer), layer must be 0. This will be freed automatically when the with_texture is freed.

Parameters
NameTypeDefault
viewRDTextureView—
withTextureRid—
layeruint—
mipmapuint—
mipmapsuint—
sliceTypeRenderingDevice.TextureSliceType—
Returns Rid
# TextureCreateSharedFromSlice · 2/2
C#
public Rid TextureCreateSharedFromSlice(RDTextureView view, Rid withTexture, uint layer, uint mipmap, uint mipmaps = 1, RenderingDevice.TextureSliceType sliceType = RenderingDevice.TextureSliceType.Slice2D, uint layers = 0);

Creates a shared texture using the specified view and the texture information from with_texture's layer and mipmap. The number of included mipmaps from the original texture can be controlled using the mipmaps parameter. The layers parameter controls the number of included layers from the original texture for 2D texture arrays, and must be 0 for all other texture types. If layers is 0 for a 2D texture array, layer must also be 0, and all available layers will be included. Only relevant for textures with multiple layers, such as 3D textures, texture arrays and cubemaps. For single-layer textures, use RenderingDevice.TextureCreateShared. For 2D textures (which only have one layer), layer must be 0. This will be freed automatically when the with_texture is freed.

Parameters
NameTypeDefault
viewRDTextureView—
withTextureRid—
layeruint—
mipmapuint—
mipmapsuint1
sliceTypeRenderingDevice.TextureSliceTypeRenderingDevice.TextureSliceType.Slice2D
layersuint0
Returns Rid
TextureGetDatabyte[]
# TextureGetData
C#
public byte[] TextureGetData(Rid texture, uint layer);

Returns the texture data for the specified layer as raw binary data. For 2D textures (which only have one layer), layer must be 0. Note: texture can't be retrieved while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to RenderingDevice.FinalAction.Continue) to retrieve this texture. Otherwise, an error is printed and an empty byte[] is returned. Note: texture requires the RenderingDevice.TextureUsageBits.CanCopyFromBit to be retrieved. Otherwise, an error is printed and an empty byte[] is returned. Note: This method will block the GPU from working until the data is retrieved. Refer to RenderingDevice.TextureGetDataAsync for an alternative that returns the data in more performant way.

Parameters
NameTypeDefault
textureRid—
layeruint—
Returns byte[]
TextureGetDataAsyncError
# TextureGetDataAsync
C#
public Error TextureGetDataAsync(Rid texture, uint layer, Callable callback);

Asynchronous version of RenderingDevice.TextureGetData. RenderingDevice will call callback in a certain amount of frames with the data the texture had at the time of the request. Note: At the moment, the delay corresponds to the amount of frames specified by ProjectSettings.rendering/rendering_device/vsync/frame_queue_size. Note: Downloading large textures can have a prohibitive cost for real-time even when using the asynchronous method due to hardware bandwidth limitations. When dealing with large resources, you can adjust settings such as ProjectSettings.rendering/rendering_device/staging_buffer/texture_download_region_size_px and ProjectSettings.rendering/rendering_device/staging_buffer/block_size_kb to improve the transfer speed at the cost of extra memory.

Parameters
NameTypeDefault
textureRid—
layeruint—
callbackCallable—
Returns Error
TextureGetFormatRDTextureFormat
# TextureGetFormat
C#
public RDTextureFormat TextureGetFormat(Rid texture);

Returns the data format used to create this texture.

Parameters
NameTypeDefault
textureRid—
Returns RDTextureFormat
TextureGetNativeHandleulong · Deprecated
# TextureGetNativeHandle
C#
public ulong TextureGetNativeHandle(Rid texture);

Returns the internal graphics handle for this texture object. For use when communicating with third-party APIs mostly with ReckfellExtension. Note: This function returns a uint64_t which internally maps to a GLuint (OpenGL) or VkImage (Vulkan).

Parameters
NameTypeDefault
textureRid—
Returns ulong
TextureIsDiscardablebool
# TextureIsDiscardable
C#
public bool TextureIsDiscardable(Rid texture);

Returns true if the texture is discardable, false otherwise. See RDTextureFormat or RenderingDevice.TextureSetDiscardable.

Parameters
NameTypeDefault
textureRid—
Returns bool
TextureIsFormatSupportedForUsagebool
# TextureIsFormatSupportedForUsage
C#
public bool TextureIsFormatSupportedForUsage(RenderingDevice.DataFormat format, RenderingDevice.TextureUsageBits usageFlags);

Returns true if the specified format is supported for the given usage_flags, false otherwise.

Parameters
NameTypeDefault
formatRenderingDevice.DataFormat—
usageFlagsRenderingDevice.TextureUsageBits—
Returns bool
TextureIsSharedbool
# TextureIsShared
C#
public bool TextureIsShared(Rid texture);

Returns true if the texture is shared, false otherwise. See RDTextureView.

Parameters
NameTypeDefault
textureRid—
Returns bool
TextureIsValidbool
# TextureIsValid
C#
public bool TextureIsValid(Rid texture);

Returns true if the texture is valid, false otherwise.

Parameters
NameTypeDefault
textureRid—
Returns bool
TextureResolveMultisample2 overloads
# TextureResolveMultisample · 1/2
C#
public Error TextureResolveMultisample(Rid fromTexture, Rid toTexture);

Resolves the from_texture texture onto to_texture with multisample antialiasing enabled. This must be used when rendering a framebuffer for MSAA to work. Returns Error.Ok if successful, Error.InvalidParameter otherwise. Note: from_texture and to_texture textures must have the same dimension, format and type (color or depth). Note: from_texture can't be copied while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to RenderingDevice.FinalAction.Continue) to resolve this texture. Note: from_texture requires the RenderingDevice.TextureUsageBits.CanCopyFromBit to be retrieved. Note: from_texture must be multisampled and must also be 2D (or a slice of a 3D/cubemap texture). Note: to_texture can't be copied while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to RenderingDevice.FinalAction.Continue) to resolve this texture. Note: to_texture texture requires the RenderingDevice.TextureUsageBits.CanCopyToBit to be retrieved. Note: to_texture texture must not be multisampled and must also be 2D (or a slice of a 3D/cubemap texture).

Parameters
NameTypeDefault
fromTextureRid—
toTextureRid—
Returns Error
# TextureResolveMultisample · 2/2
C#
public Error TextureResolveMultisample(Rid fromTexture, Rid toTexture, RenderingDevice.BarrierMask postBarrier);

Resolves the from_texture texture onto to_texture with multisample antialiasing enabled. This must be used when rendering a framebuffer for MSAA to work. Returns Error.Ok if successful, Error.InvalidParameter otherwise. Note: from_texture and to_texture textures must have the same dimension, format and type (color or depth). Note: from_texture can't be copied while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to RenderingDevice.FinalAction.Continue) to resolve this texture. Note: from_texture requires the RenderingDevice.TextureUsageBits.CanCopyFromBit to be retrieved. Note: from_texture must be multisampled and must also be 2D (or a slice of a 3D/cubemap texture). Note: to_texture can't be copied while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to RenderingDevice.FinalAction.Continue) to resolve this texture. Note: to_texture texture requires the RenderingDevice.TextureUsageBits.CanCopyToBit to be retrieved. Note: to_texture texture must not be multisampled and must also be 2D (or a slice of a 3D/cubemap texture).

Parameters
NameTypeDefault
fromTextureRid—
toTextureRid—
postBarrierRenderingDevice.BarrierMask—
Returns Error
TextureSetDiscardablevoid
# TextureSetDiscardable
C#
public void TextureSetDiscardable(Rid texture, bool discardable);

Updates the discardable property of texture. If a texture is discardable, its contents do not need to be preserved between frames. This flag is only relevant when the texture is used as target in a draw list. This information is used by RenderingDevice to figure out if a texture's contents can be discarded, eliminating unnecessary writes to memory and boosting performance.

Parameters
NameTypeDefault
textureRid—
discardablebool—
TextureUpdate4 overloads
# TextureUpdate · 1/4
C#
public Error TextureUpdate(Rid texture, uint layer, byte[] data);

Updates texture data with new data, replacing the previous data in place. The updated texture data must have the same dimensions and format. For 2D textures (which only have one layer), layer must be 0. Returns Error.Ok if the update was successful, Error.InvalidParameter otherwise. Note: Updating textures is forbidden during creation of a draw or compute list. Note: The existing texture can't be updated while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to RenderingDevice.FinalAction.Continue) to update this texture. Note: The existing texture requires the RenderingDevice.TextureUsageBits.CanUpdateBit to be updatable.

Parameters
NameTypeDefault
textureRid—
layeruint—
databyte[]—
Returns Error
# TextureUpdate · 2/4
C#
public Error TextureUpdate(Rid texture, uint layer, byte[] data, RenderingDevice.BarrierMask postBarrier);

Updates texture data with new data, replacing the previous data in place. The updated texture data must have the same dimensions and format. For 2D textures (which only have one layer), layer must be 0. Returns Error.Ok if the update was successful, Error.InvalidParameter otherwise. Note: Updating textures is forbidden during creation of a draw or compute list. Note: The existing texture can't be updated while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to RenderingDevice.FinalAction.Continue) to update this texture. Note: The existing texture requires the RenderingDevice.TextureUsageBits.CanUpdateBit to be updatable.

Parameters
NameTypeDefault
textureRid—
layeruint—
databyte[]—
postBarrierRenderingDevice.BarrierMask—
Returns Error
# TextureUpdate · 3/4
C#
public Error TextureUpdate(Rid texture, uint layer, ReadOnlySpan<byte> data);

Updates texture data with new data, replacing the previous data in place. The updated texture data must have the same dimensions and format. For 2D textures (which only have one layer), layer must be 0. Returns Error.Ok if the update was successful, Error.InvalidParameter otherwise. Note: Updating textures is forbidden during creation of a draw or compute list. Note: The existing texture can't be updated while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to RenderingDevice.FinalAction.Continue) to update this texture. Note: The existing texture requires the RenderingDevice.TextureUsageBits.CanUpdateBit to be updatable.

Parameters
NameTypeDefault
textureRid—
layeruint—
dataReadOnlySpan<byte>—
Returns Error
# TextureUpdate · 4/4
C#
public Error TextureUpdate(Rid texture, uint layer, ReadOnlySpan<byte> data, RenderingDevice.BarrierMask postBarrier);

Updates texture data with new data, replacing the previous data in place. The updated texture data must have the same dimensions and format. For 2D textures (which only have one layer), layer must be 0. Returns Error.Ok if the update was successful, Error.InvalidParameter otherwise. Note: Updating textures is forbidden during creation of a draw or compute list. Note: The existing texture can't be updated while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to RenderingDevice.FinalAction.Continue) to update this texture. Note: The existing texture requires the RenderingDevice.TextureUsageBits.CanUpdateBit to be updatable.

Parameters
NameTypeDefault
textureRid—
layeruint—
dataReadOnlySpan<byte>—
postBarrierRenderingDevice.BarrierMask—
Returns Error
TlasBuildError
# TlasBuild
C#
public Error TlasBuild(Rid tlas, Reckfell.Collections.Array<RDAccelerationStructureInstance> instances);

Builds the tlas. The contents of previous builds are discarded. Any BLAS provided through the RDAccelerationStructureInstance.Blas member must already have been built using the RenderingDevice.BlasBuild method. The number of instances can be equal to or smaller than the maximum instance count provided in the RenderingDevice.TlasCreate method. Note: Freeing or rebuilding any of the provided BLASes after this method invalidates the TLAS and requires it to be rebuilt.

Parameters
NameTypeDefault
tlasRid—
instancesReckfell.Collections.Array<RDAccelerationStructureInstance>—
Returns Error
TlasCreateRid
# TlasCreate
C#
public Rid TlasCreate(uint maxInstanceCount, RenderingDevice.AccelerationStructureFlagBits flags);

Creates a new Top-Level Acceleration Structure (TLAS). It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's RenderingDevice.FreeRid method.

Parameters
NameTypeDefault
maxInstanceCountuint—
flagsRenderingDevice.AccelerationStructureFlagBits—
Returns Rid
UniformBufferCreate4 overloads
# UniformBufferCreate · 1/4
C#
public Rid UniformBufferCreate(uint sizeBytes, byte[] data);

Creates a new uniform buffer. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's RenderingDevice.FreeRid method.

Parameters
NameTypeDefault
sizeBytesuint—
databyte[]—
data

If the parameter is null, then the default value is Array.Empty<byte>().

Returns Rid
# UniformBufferCreate · 2/4
C#
public Rid UniformBufferCreate(uint sizeBytes, byte[] data = null, RenderingDevice.BufferCreationBits creationBits = (RenderingDevice.BufferCreationBits)0);

Creates a new uniform buffer. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's RenderingDevice.FreeRid method.

Parameters
NameTypeDefault
sizeBytesuint—
databyte[]null
creationBitsRenderingDevice.BufferCreationBits(RenderingDevice.BufferCreationBits)0
data

If the parameter is null, then the default value is Array.Empty<byte>().

Returns Rid
# UniformBufferCreate · 3/4
C#
public Rid UniformBufferCreate(uint sizeBytes, ReadOnlySpan<byte> data);

Creates a new uniform buffer. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's RenderingDevice.FreeRid method.

Parameters
NameTypeDefault
sizeBytesuint—
dataReadOnlySpan<byte>—
Returns Rid
# UniformBufferCreate · 4/4
C#
public Rid UniformBufferCreate(uint sizeBytes, ReadOnlySpan<byte> data, RenderingDevice.BufferCreationBits creationBits);

Creates a new uniform buffer. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's RenderingDevice.FreeRid method.

Parameters
NameTypeDefault
sizeBytesuint—
dataReadOnlySpan<byte>—
creationBitsRenderingDevice.BufferCreationBits—
Returns Rid
UniformSetCreateRid
# UniformSetCreate
C#
public Rid UniformSetCreate(Reckfell.Collections.Array<RDUniform> uniforms, Rid shader, uint shaderSet);

Creates a resource set for the specified shader set. RDUniform.Binding, resource types and all required bindings must match the shader layout; resource RIDs belong to the same device.

Parameters
NameTypeDefault
uniformsReckfell.Collections.Array<RDUniform>—
shaderRid—
shaderSetuint—
uniforms

Descriptions covering all required bindings in the selected set.

shader

Same-device shader RID with the corresponding layout.

shaderSet

GLSL set index declared by the shader, not a binding number.

Returns Rid

RID of the created device-owned resource; check validity.

UniformSetIsValidbool
# UniformSetIsValid
C#
public bool UniformSetIsValid(Rid uniformSet);

Checks if the uniform_set is valid, i.e. is owned.

Parameters
NameTypeDefault
uniformSetRid—
Returns bool
VertexArrayCreate2 overloads
# VertexArrayCreate · 1/2
C#
public Rid VertexArrayCreate(uint vertexCount, long vertexFormat, Reckfell.Collections.Array<Rid> srcBuffers, long[] offsets = null);

Creates a vertex array based on the specified buffers. Optionally, offsets (in bytes) may be defined for each buffer. Once finished with your RID, you will want to free the RID using the RenderingDevice's RenderingDevice.FreeRid method. This will be freed automatically when any of the src_buffers is freed.

Parameters
NameTypeDefault
vertexCountuint—
vertexFormatlong—
srcBuffersReckfell.Collections.Array<Rid>—
offsetslong[]null
offsets

If the parameter is null, then the default value is Array.Empty<long>().

Returns Rid
# VertexArrayCreate · 2/2
C#
public Rid VertexArrayCreate(uint vertexCount, long vertexFormat, Reckfell.Collections.Array<Rid> srcBuffers, ReadOnlySpan<long> offsets);

Creates a vertex array based on the specified buffers. Optionally, offsets (in bytes) may be defined for each buffer. Once finished with your RID, you will want to free the RID using the RenderingDevice's RenderingDevice.FreeRid method. This will be freed automatically when any of the src_buffers is freed.

Parameters
NameTypeDefault
vertexCountuint—
vertexFormatlong—
srcBuffersReckfell.Collections.Array<Rid>—
offsetsReadOnlySpan<long>—
Returns Rid
VertexBufferCreate4 overloads
# VertexBufferCreate · 1/4
C#
public Rid VertexBufferCreate(uint sizeBytes, byte[] data = null, RenderingDevice.BufferCreationBits creationBits = (RenderingDevice.BufferCreationBits)0);

Creates a new vertex buffer. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's RenderingDevice.FreeRid method.

Parameters
NameTypeDefault
sizeBytesuint—
databyte[]null
creationBitsRenderingDevice.BufferCreationBits(RenderingDevice.BufferCreationBits)0
data

If the parameter is null, then the default value is Array.Empty<byte>().

Returns Rid
# VertexBufferCreate · 2/4
C#
public Rid VertexBufferCreate(uint sizeBytes, byte[] data, bool useAsStorage);

Creates a new vertex buffer. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's RenderingDevice.FreeRid method.

Parameters
NameTypeDefault
sizeBytesuint—
databyte[]—
useAsStoragebool—
data

If the parameter is null, then the default value is Array.Empty<byte>().

Returns Rid
# VertexBufferCreate · 3/4
C#
public Rid VertexBufferCreate(uint sizeBytes, ReadOnlySpan<byte> data, RenderingDevice.BufferCreationBits creationBits);

Creates a new vertex buffer. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's RenderingDevice.FreeRid method.

Parameters
NameTypeDefault
sizeBytesuint—
dataReadOnlySpan<byte>—
creationBitsRenderingDevice.BufferCreationBits—
Returns Rid
# VertexBufferCreate · 4/4
C#
public Rid VertexBufferCreate(uint sizeBytes, ReadOnlySpan<byte> data, bool useAsStorage);

Creates a new vertex buffer. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's RenderingDevice.FreeRid method.

Parameters
NameTypeDefault
sizeBytesuint—
dataReadOnlySpan<byte>—
useAsStoragebool—
Returns Rid
VertexFormatCreatelong
# VertexFormatCreate
C#
public long VertexFormatCreate(Reckfell.Collections.Array<RDVertexAttribute> vertexDescriptions);

Creates a new vertex format with the specified vertex_descriptions. Returns a unique vertex format ID corresponding to the newly created vertex format.

Parameters
NameTypeDefault
vertexDescriptionsReckfell.Collections.Array<RDVertexAttribute>—
Returns long

Fields and constants2

InvalidFormatIdField
# InvalidFormatId
C#
public const long InvalidFormatId = -1;

Returned by functions that return a format ID if a value is invalid.

InvalidIdField
# InvalidId
C#
public const long InvalidId = -1;

Returned by functions that return an ID if a value is invalid.

RenderingDevice.AccelerationStructureFlagBits

ValueDescription
AllowCompactionBit = 2

Allows the acceleration structure to be compacted to reduce memory usage after it has been built.

AllowUpdateBit = 1

Allows the acceleration structure to be updated after it has been built.

LowMemoryBit = 16

Reduces the memory usage of the acceleration structure, potentially at the cost of reduced ray traversal performance.

PreferFastBuildBit = 8

Prioritizes build performance over ray traversal performance when building the acceleration structure.

PreferFastTraceBit = 4

Prioritizes ray traversal performance over build performance when building the acceleration structure.

RenderingDevice.AccelerationStructureGeometryFlagBits

ValueDescription
NoDuplicateAnyHitInvocationBit = 2

This geometry only calls the any hit shader a single time for each primitive.

OpaqueBit = 1

An opaque geometry does not invoke the any hit shaders.

RenderingDevice.AccelerationStructureInstanceFlagBits

ValueDescription
ForceNoOpaqueBit = 8

Forces all geometries in this instance to be treated as non-opaque, allowing any hit shaders to be invoked.

ForceOpaqueBit = 4

Forces all geometries in this instance to be treated as opaque, preventing any hit shaders from being invoked.

TriangleFacingCullDisableBit = 1

Disables triangle face culling for this instance during ray traversal.

TriangleFlipFacingBit = 2

Flips the triangle facing direction for this instance during ray traversal.

RenderingDevice.BarrierMask

ValueDescription
AllBarriers = 32767

Barrier mask for all types (vertex, fragment, compute, transfer).

Compute = 2

Compute barrier mask.

Fragment = 8

Fragment shader barrier mask.

NoBarrier = 32768

No barrier for any type.

Raster = 9

Raster barrier mask (vertex and fragment). Equivalent to BARRIER_MASK_VERTEX | BARRIER_MASK_FRAGMENT.

Transfer = 4

Transfer barrier mask.

Vertex = 1

Vertex shader barrier mask.

RenderingDevice.BlendFactor

ValueDescription
ConstantAlpha = 12

Color and alpha blend factor is blend constant alpha (see RenderingDevice.DrawListSetBlendConstants).

ConstantColor = 10

Color blend factor is blend constant color. Alpha blend factor is blend constant alpha (see RenderingDevice.DrawListSetBlendConstants).

DstAlpha = 8

Color and alpha blend factor is destination alpha.

DstColor = 4

Color blend factor is destination color. Alpha blend factor is destination alpha.

Max = 19

Represents the size of the RenderingDevice.BlendFactor enum.

One = 1

Constant 1.0 blend factor.

OneMinusConstantAlpha = 13

Color and alpha blend factor is 1.0 - blend constant alpha (see RenderingDevice.DrawListSetBlendConstants).

OneMinusConstantColor = 11

Color blend factor is 1.0 - blend constant color. Alpha blend factor is 1.0 - blend constant alpha (see RenderingDevice.DrawListSetBlendConstants).

OneMinusDstAlpha = 9

Color and alpha blend factor is 1.0 - destination alpha.

OneMinusDstColor = 5

Color blend factor is 1.0 - destination color. Alpha blend factor is 1.0 - destination alpha.

OneMinusSrc1Alpha = 18

Color and alpha blend factor is 1.0 - second source alpha. Only relevant for dual-source blending.

OneMinusSrc1Color = 16

Color blend factor is 1.0 - second source color. Alpha blend factor is 1.0 - second source alpha. Only relevant for dual-source blending.

OneMinusSrcAlpha = 7

Color and alpha blend factor is 1.0 - source alpha.

OneMinusSrcColor = 3

Color blend factor is 1.0 - source color. Alpha blend factor is 1.0 - source alpha.

Src1Alpha = 17

Color and alpha blend factor is second source alpha. Only relevant for dual-source blending.

Src1Color = 15

Color blend factor is second source color. Alpha blend factor is second source alpha. Only relevant for dual-source blending.

SrcAlpha = 6

Color and alpha blend factor is source alpha.

SrcAlphaSaturate = 14

Color blend factor is min(source alpha, 1.0 - destination alpha). Alpha blend factor is 1.0.

SrcColor = 2

Color blend factor is source color. Alpha blend factor is source alpha.

Zero = 0

Constant 0.0 blend factor.

RenderingDevice.BlendOperation

ValueDescription
Add = 0

Additive blending operation (source + destination).

Max = 5

Represents the size of the RenderingDevice.BlendOperation enum.

Maximum = 4

Maximum blending operation (keep the highest value of the two).

Minimum = 3

Minimum blending operation (keep the lowest value of the two).

ReverseSubtract = 2

Reverse subtractive blending operation (destination - source).

Subtract = 1

Subtractive blending operation (source - destination).

RenderingDevice.BreadcrumbMarker

ValueDescription
AlphaPass = 458752

During a GPU crash in dev or debug mode, Reckfell's error message will include "ALPHA_PASS" for added context as to when the crash occurred.

BlitPass = 655360

During a GPU crash in dev or debug mode, Reckfell's error message will include "BLIT_PASS" for added context as to when the crash occurred.

DebugPass = 786432

During a GPU crash in dev or debug mode, Reckfell's error message will include "DEBUG_PASS" for added context as to when the crash occurred.

LightmapperPass = 196608

During a GPU crash in dev or debug mode, Reckfell's error message will include "LIGHTMAPPER_PASS" for added context as to when the crash occurred.

None = 0

No breadcrumb marker will be added.

OpaquePass = 393216

During a GPU crash in dev or debug mode, Reckfell's error message will include "OPAQUE_PASS" for added context as to when the crash occurred.

PostProcessingPass = 589824

During a GPU crash in dev or debug mode, Reckfell's error message will include "POST_PROCESSING_PASS" for added context as to when the crash occurred.

ReflectionProbes = 65536

During a GPU crash in dev or debug mode, Reckfell's error message will include "REFLECTION_PROBES" for added context as to when the crash occurred.

ShadowPassCube = 327680

During a GPU crash in dev or debug mode, Reckfell's error message will include "SHADOW_PASS_CUBE" for added context as to when the crash occurred.

ShadowPassDirectional = 262144

During a GPU crash in dev or debug mode, Reckfell's error message will include "SHADOW_PASS_DIRECTIONAL" for added context as to when the crash occurred.

SkyPass = 131072

During a GPU crash in dev or debug mode, Reckfell's error message will include "SKY_PASS" for added context as to when the crash occurred.

TransparentPass = 524288

During a GPU crash in dev or debug mode, Reckfell's error message will include "TRANSPARENT_PASS" for added context as to when the crash occurred.

UiPass = 720896

During a GPU crash in dev or debug mode, Reckfell's error message will include "UI_PASS" for added context as to when the crash occurred.

RenderingDevice.BufferCreationBits

ValueDescription
AccelerationStructureBuildInputReadOnlyBit = 8

Allows usage of this buffer as input data for an acceleration structure build operation. You must first check that the GPU supports it:

AsStorageBit = 2

Set this flag so that it is created as storage. This is useful if Compute Shaders need access (for reading or writing) to the buffer, e.g. skeletal animations are processed in Compute Shaders which need access to vertex buffers, to be later consumed by vertex shaders as part of the regular rasterization pipeline.

DeviceAddressBit = 1

Optionally, set this flag if you wish to use RenderingDevice.BufferGetDeviceAddress functionality. You must first check the GPU supports it:

RenderingDevice.CompareOperator

ValueDescription
Always = 7

"Always" comparison (opposite of RenderingDevice.CompareOperator.Never).

Equal = 2

"Equal" comparison.

Greater = 4

"Greater than" comparison.

GreaterOrEqual = 6

"Greater than or equal" comparison.

Less = 1

"Less than" comparison.

LessOrEqual = 3

"Less than or equal" comparison.

Max = 8

Represents the size of the RenderingDevice.CompareOperator enum.

Never = 0

"Never" comparison (opposite of RenderingDevice.CompareOperator.Always).

NotEqual = 5

"Not equal" comparison.

RenderingDevice.DataFormat

ValueDescription
A1R5G5B5UnormPack16 = 7

Alpha/red/green/blue channel data format with 1 bit of alpha, 5 bits of red, 6 bits of green and 5 bits of blue, packed into 16 bits. Values are in the [0.0, 1.0] range.

A2B10G10R10SintPack32 = 68

Signed integer alpha/blue/green/red channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of blue, 10 bits of green and 10 bits of red. Values are in the [-511, 511] range for blue/green/red and [-1, 1] for alpha.

A2B10G10R10SnormPack32 = 64

Signed floating-point alpha/blue/green/red channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of blue, 10 bits of green and 10 bits of red. Values are in the [-1.0, 1.0] range.

A2B10G10R10SscaledPack32 = 66

Signed floating-point alpha/blue/green/red channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of blue, 10 bits of green and 10 bits of red. Values are in the [-511.0, 511.0] range for blue/green/red and [-1.0, 1.0] for alpha.

A2B10G10R10UintPack32 = 67

Unsigned integer alpha/blue/green/red channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of blue, 10 bits of green and 10 bits of red. Values are in the [0, 1023] range for blue/green/red and [0, 3] for alpha.

A2B10G10R10UnormPack32 = 63

Unsigned floating-point alpha/blue/green/red channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of blue, 10 bits of green and 10 bits of red. Values are in the [0.0, 1.0] range.

A2B10G10R10UscaledPack32 = 65

Unsigned floating-point alpha/blue/green/red channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of blue, 10 bits of green and 10 bits of red. Values are in the [0.0, 1023.0] range for blue/green/red and [0.0, 3.0] for alpha.

A2R10G10B10SintPack32 = 62

Signed integer alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of red, 10 bits of green and 10 bits of blue. Values are in the [-511, 511] range for red/green/blue and [-1, 1] for alpha.

A2R10G10B10SnormPack32 = 58

Signed floating-point alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of red, 10 bits of green and 10 bits of blue. Values are in the [-1.0, 1.0] range.

A2R10G10B10SscaledPack32 = 60

Signed floating-point alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of red, 10 bits of green and 10 bits of blue. Values are in the [-511.0, 511.0] range for red/green/blue and [-1.0, 1.0] for alpha.

A2R10G10B10UintPack32 = 61

Unsigned integer alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of red, 10 bits of green and 10 bits of blue. Values are in the [0, 1023] range for red/green/blue and [0, 3] for alpha.

A2R10G10B10UnormPack32 = 57

Unsigned floating-point alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of red, 10 bits of green and 10 bits of blue. Values are in the [0.0, 1.0] range.

A2R10G10B10UscaledPack32 = 59

Unsigned floating-point alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of red, 10 bits of green and 10 bits of blue. Values are in the [0.0, 1023.0] range for red/green/blue and [0.0, 3.0] for alpha.

A8B8G8R8SintPack32 = 55

8-bit-per-channel signed integer alpha/red/green/blue channel data format, packed in 32 bits. Values are in the [-127, 127] range.

A8B8G8R8SnormPack32 = 51

8-bit-per-channel signed floating-point alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Values are in the [-1.0, 1.0] range.

A8B8G8R8SrgbPack32 = 56

8-bit-per-channel unsigned floating-point alpha/red/green/blue channel data format with normalized value and nonlinear sRGB encoding, packed in 32 bits. Values are in the [0.0, 1.0] range.

A8B8G8R8SscaledPack32 = 53

8-bit-per-channel signed floating-point alpha/red/green/blue channel data format with scaled value (value is converted from integer to float), packed in 32 bits. Values are in the [-127.0, 127.0] range.

A8B8G8R8UintPack32 = 54

8-bit-per-channel unsigned integer alpha/red/green/blue channel data format, packed in 32 bits. Values are in the [0, 255] range.

A8B8G8R8UnormPack32 = 50

8-bit-per-channel unsigned floating-point alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Values are in the [0.0, 1.0] range.

A8B8G8R8UscaledPack32 = 52

8-bit-per-channel unsigned floating-point alpha/red/green/blue channel data format with scaled value (value is converted from integer to float), packed in 32 bits. Values are in the [0.0, 255.0] range.

Astc10X10SfloatBlock = 229
Astc10X10SrgbBlock = 179

VRAM-compressed unsigned floating-point data format with normalized value and nonlinear sRGB encoding, packed in 10×10 blocks. Values are in the [0.0, 1.0] range. Using ASTC compression.

Astc10X10UnormBlock = 178

VRAM-compressed unsigned floating-point data format with normalized value, packed in 10×10 blocks. Values are in the [0.0, 1.0] range. Using ASTC compression.

Astc10X5SfloatBlock = 226
Astc10X5SrgbBlock = 173

VRAM-compressed unsigned floating-point data format with normalized value and nonlinear sRGB encoding, packed in 10×5 blocks. Values are in the [0.0, 1.0] range. Using ASTC compression.

Astc10X5UnormBlock = 172

VRAM-compressed unsigned floating-point data format with normalized value, packed in 10×5 blocks. Values are in the [0.0, 1.0] range. Using ASTC compression.

Astc10X6SfloatBlock = 227
Astc10X6SrgbBlock = 175

VRAM-compressed unsigned floating-point data format with normalized value and nonlinear sRGB encoding, packed in 10×6 blocks. Values are in the [0.0, 1.0] range. Using ASTC compression.

Astc10X6UnormBlock = 174

VRAM-compressed unsigned floating-point data format with normalized value, packed in 10×6 blocks. Values are in the [0.0, 1.0] range. Using ASTC compression.

Astc10X8SfloatBlock = 228
Astc10X8SrgbBlock = 177

VRAM-compressed unsigned floating-point data format with normalized value and nonlinear sRGB encoding, packed in 10×8 blocks. Values are in the [0.0, 1.0] range. Using ASTC compression.

Astc10X8UnormBlock = 176

VRAM-compressed unsigned floating-point data format with normalized value, packed in 10×8 blocks. Values are in the [0.0, 1.0] range. Using ASTC compression.

Astc12X10SfloatBlock = 230
Astc12X10SrgbBlock = 181

VRAM-compressed unsigned floating-point data format with normalized value and nonlinear sRGB encoding, packed in 12×10 blocks. Values are in the [0.0, 1.0] range. Using ASTC compression.

Astc12X10UnormBlock = 180

VRAM-compressed unsigned floating-point data format with normalized value, packed in 12×10 blocks. Values are in the [0.0, 1.0] range. Using ASTC compression.

Astc12X12SfloatBlock = 231
Astc12X12SrgbBlock = 183

VRAM-compressed unsigned floating-point data format with normalized value and nonlinear sRGB encoding, packed in 12 blocks (lowest quality). Values are in the [0.0, 1.0] range. Using ASTC compression.

Astc12X12UnormBlock = 182

VRAM-compressed unsigned floating-point data format with normalized value, packed in 12 blocks (lowest quality). Values are in the [0.0, 1.0] range. Using ASTC compression.

Astc4X4SfloatBlock = 218
Astc4X4SrgbBlock = 157

VRAM-compressed unsigned floating-point data format with normalized value and nonlinear sRGB encoding, packed in 4×4 blocks (highest quality). Values are in the [0.0, 1.0] range. Using ASTC compression.

Astc4X4UnormBlock = 156

VRAM-compressed unsigned floating-point data format with normalized value, packed in 4×4 blocks (highest quality). Values are in the [0.0, 1.0] range. Using ASTC compression.

Astc5X4SfloatBlock = 219
Astc5X4SrgbBlock = 159

VRAM-compressed unsigned floating-point data format with normalized value and nonlinear sRGB encoding, packed in 5×4 blocks. Values are in the [0.0, 1.0] range. Using ASTC compression.

Astc5X4UnormBlock = 158

VRAM-compressed unsigned floating-point data format with normalized value, packed in 5×4 blocks. Values are in the [0.0, 1.0] range. Using ASTC compression.

Astc5X5SfloatBlock = 220
Astc5X5SrgbBlock = 161

VRAM-compressed unsigned floating-point data format with normalized value and nonlinear sRGB encoding, packed in 5×5 blocks. Values are in the [0.0, 1.0] range. Using ASTC compression.

Astc5X5UnormBlock = 160

VRAM-compressed unsigned floating-point data format with normalized value, packed in 5×5 blocks. Values are in the [0.0, 1.0] range. Using ASTC compression.

Astc6X5SfloatBlock = 221
Astc6X5SrgbBlock = 163

VRAM-compressed unsigned floating-point data format with normalized value and nonlinear sRGB encoding, packed in 6×5 blocks. Values are in the [0.0, 1.0] range. Using ASTC compression.

Astc6X5UnormBlock = 162

VRAM-compressed unsigned floating-point data format with normalized value, packed in 6×5 blocks. Values are in the [0.0, 1.0] range. Using ASTC compression.

Astc6X6SfloatBlock = 222
Astc6X6SrgbBlock = 165

VRAM-compressed unsigned floating-point data format with normalized value and nonlinear sRGB encoding, packed in 6×6 blocks. Values are in the [0.0, 1.0] range. Using ASTC compression.

Astc6X6UnormBlock = 164

VRAM-compressed unsigned floating-point data format with normalized value, packed in 6×6 blocks. Values are in the [0.0, 1.0] range. Using ASTC compression.

Astc8X5SfloatBlock = 223
Astc8X5SrgbBlock = 167

VRAM-compressed unsigned floating-point data format with normalized value and nonlinear sRGB encoding, packed in 8×5 blocks. Values are in the [0.0, 1.0] range. Using ASTC compression.

Astc8X5UnormBlock = 166

VRAM-compressed unsigned floating-point data format with normalized value, packed in 8×5 blocks. Values are in the [0.0, 1.0] range. Using ASTC compression.

Astc8X6SfloatBlock = 224
Astc8X6SrgbBlock = 169

VRAM-compressed unsigned floating-point data format with normalized value and nonlinear sRGB encoding, packed in 8×6 blocks. Values are in the [0.0, 1.0] range. Using ASTC compression.

Astc8X6UnormBlock = 168

VRAM-compressed unsigned floating-point data format with normalized value, packed in 8×6 blocks. Values are in the [0.0, 1.0] range. Using ASTC compression.

Astc8X8SfloatBlock = 225
Astc8X8SrgbBlock = 171

VRAM-compressed unsigned floating-point data format with normalized value and nonlinear sRGB encoding, packed in 8×8 blocks. Values are in the [0.0, 1.0] range. Using ASTC compression.

Astc8X8UnormBlock = 170

VRAM-compressed unsigned floating-point data format with normalized value, packed in 8×8 blocks. Values are in the [0.0, 1.0] range. Using ASTC compression.

B10G11R11UfloatPack32 = 121

Unsigned floating-point blue/green/red data format with the value stored as-is, packed in 32 bits. The format's precision is 10 bits of blue channel, 11 bits of green channel and 11 bits of red channel.

B10X6G10X6R10X6G10X6422Unorm4Pack16 = 195

10-bit-per-channel unsigned floating-point blue/green/red/green channel data with normalized value, plus 6 unused bits after each channel, packed in 4×16 bits. Values are in the [0.0, 1.0] range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). The green channel is listed twice, but contains different values to allow it to be represented at full resolution.

B12X4G12X4R12X4G12X4422Unorm4Pack16 = 205

12-bit-per-channel unsigned floating-point blue/green/red/green channel data with normalized value, plus 6 unused bits after each channel, packed in 4×16 bits. Values are in the [0.0, 1.0] range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). The green channel is listed twice, but contains different values to allow it to be represented at full resolution.

B16G16R16G16422Unorm = 212

16-bit-per-channel unsigned floating-point blue/green/red channel data format with normalized value. Values are in the [0.0, 1.0] range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel).

B4G4R4A4UnormPack16 = 2

4-bit-per-channel blue/green/red/alpha channel data format, packed into 16 bits. Values are in the [0.0, 1.0] range.

B5G5R5A1UnormPack16 = 6

Blue/green/red/alpha channel data format with 5 bits of blue, 6 bits of green, 5 bits of red and 1 bit of alpha, packed into 16 bits. Values are in the [0.0, 1.0] range.

B5G6R5UnormPack16 = 4

Blue/green/red channel data format with 5 bits of blue, 6 bits of green and 5 bits of red, packed into 16 bits. Values are in the [0.0, 1.0] range.

B8G8R8A8Sint = 48

8-bit-per-channel signed integer blue/green/red/alpha channel data format. Values are in the [-127, 127] range.

B8G8R8A8Snorm = 44

8-bit-per-channel signed floating-point blue/green/red/alpha channel data format with normalized value. Values are in the [-1.0, 1.0] range.

B8G8R8A8Srgb = 49

8-bit-per-channel unsigned floating-point blue/green/red/alpha channel data format with normalized value and nonlinear sRGB encoding. Values are in the [0.0, 1.0] range.

B8G8R8A8Sscaled = 46

8-bit-per-channel signed floating-point blue/green/red/alpha channel data format with scaled value (value is converted from integer to float). Values are in the [-127.0, 127.0] range.

B8G8R8A8Uint = 47

8-bit-per-channel unsigned integer blue/green/red/alpha channel data format. Values are in the [0, 255] range.

B8G8R8A8Unorm = 43

8-bit-per-channel unsigned floating-point blue/green/red/alpha channel data format with normalized value. Values are in the [0.0, 1.0] range.

B8G8R8A8Uscaled = 45

8-bit-per-channel unsigned floating-point blue/green/red/alpha channel data format with scaled value (value is converted from integer to float). Values are in the [0.0, 255.0] range.

B8G8R8G8422Unorm = 185

8-bit-per-channel unsigned floating-point blue/green/red channel data format with normalized value. Values are in the [0.0, 1.0] range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel).

B8G8R8Sint = 34

8-bit-per-channel signed integer blue/green/red channel data format. Values are in the [-127, 127] range.

B8G8R8Snorm = 30

8-bit-per-channel signed floating-point blue/green/red channel data format with normalized value. Values are in the [-1.0, 1.0] range.

B8G8R8Srgb = 35

8-bit-per-channel unsigned floating-point blue/green/red data format with normalized value and nonlinear sRGB encoding. Values are in the [0.0, 1.0] range.

B8G8R8Sscaled = 32

8-bit-per-channel signed floating-point blue/green/red channel data format with scaled value (value is converted from integer to float). Values are in the [-127.0, 127.0] range.

B8G8R8Uint = 33

8-bit-per-channel unsigned integer blue/green/red channel data format. Values are in the [0, 255] range.

B8G8R8Unorm = 29

8-bit-per-channel unsigned floating-point blue/green/red channel data format with normalized value. Values are in the [0.0, 1.0] range.

B8G8R8Uscaled = 31

8-bit-per-channel unsigned floating-point blue/green/red channel data format with scaled value (value is converted from integer to float). Values are in the [0.0, 255.0] range.

Bc1RgbSrgbBlock = 131

VRAM-compressed unsigned red/green/blue channel data format with normalized value and nonlinear sRGB encoding. Values are in the [0.0, 1.0] range. The format's precision is 5 bits of red channel, 6 bits of green channel, and 5 bits of blue channel. Using BC1 texture compression (also known as S3TC DXT1).

Bc1RgbUnormBlock = 130

VRAM-compressed unsigned red/green/blue channel data format with normalized value. Values are in the [0.0, 1.0] range. The format's precision is 5 bits of red channel, 6 bits of green channel and 5 bits of blue channel. Using BC1 texture compression (also known as S3TC DXT1).

Bc1RgbaSrgbBlock = 133

VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and nonlinear sRGB encoding. Values are in the [0.0, 1.0] range. The format's precision is 5 bits of red channel, 6 bits of green channel, 5 bits of blue channel, and 1 bit of alpha channel. Using BC1 texture compression (also known as S3TC DXT1).

Bc1RgbaUnormBlock = 132

VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the [0.0, 1.0] range. The format's precision is 5 bits of red channel, 6 bits of green channel, 5 bits of blue channel and 1 bit of alpha channel. Using BC1 texture compression (also known as S3TC DXT1).

Bc2SrgbBlock = 135

VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and nonlinear sRGB encoding. Values are in the [0.0, 1.0] range. The format's precision is 5 bits of red channel, 6 bits of green channel, 5 bits of blue channel, and 4 bits of alpha channel. Using BC2 texture compression (also known as S3TC DXT3).

Bc2UnormBlock = 134

VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the [0.0, 1.0] range. The format's precision is 5 bits of red channel, 6 bits of green channel, 5 bits of blue channel and 4 bits of alpha channel. Using BC2 texture compression (also known as S3TC DXT3).

Bc3SrgbBlock = 137

VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and nonlinear sRGB encoding. Values are in the [0.0, 1.0] range. The format's precision is 5 bits of red channel, 6 bits of green channel, 5 bits of blue channel, and 8 bits of alpha channel. Using BC3 texture compression (also known as S3TC DXT5).

Bc3UnormBlock = 136

VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the [0.0, 1.0] range. The format's precision is 5 bits of red channel, 6 bits of green channel, 5 bits of blue channel and 8 bits of alpha channel. Using BC3 texture compression (also known as S3TC DXT5).

Bc4SnormBlock = 139

VRAM-compressed signed red channel data format with normalized value. Values are in the [-1.0, 1.0] range. The format's precision is 8 bits of red channel. Using BC4 texture compression.

Bc4UnormBlock = 138

VRAM-compressed unsigned red channel data format with normalized value. Values are in the [0.0, 1.0] range. The format's precision is 8 bits of red channel. Using BC4 texture compression.

Bc5SnormBlock = 141

VRAM-compressed signed red/green channel data format with normalized value. Values are in the [-1.0, 1.0] range. The format's precision is 8 bits of red channel and 8 bits of green channel. Using BC5 texture compression (also known as S3TC RGTC).

Bc5UnormBlock = 140

VRAM-compressed unsigned red/green channel data format with normalized value. Values are in the [0.0, 1.0] range. The format's precision is 8 bits of red channel and 8 bits of green channel. Using BC5 texture compression (also known as S3TC RGTC).

Bc6HSfloatBlock = 143

VRAM-compressed signed red/green/blue channel data format with the floating-point value stored as-is. The format's precision is between 10 and 13 bits for the red/green/blue channels. Using BC6H texture compression (also known as BPTC HDR).

Bc6HUfloatBlock = 142

VRAM-compressed unsigned red/green/blue channel data format with the floating-point value stored as-is. The format's precision is between 10 and 13 bits for the red/green/blue channels. Using BC6H texture compression (also known as BPTC HDR).

Bc7SrgbBlock = 145

VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and nonlinear sRGB encoding. Values are in the [0.0, 1.0] range. The format's precision is between 4 and 7 bits for the red/green/blue channels and between 0 and 8 bits for the alpha channel. Also known as BPTC LDR.

Bc7UnormBlock = 144

VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the [0.0, 1.0] range. The format's precision is between 4 and 7 bits for the red/green/blue channels and between 0 and 8 bits for the alpha channel. Also known as BPTC LDR.

D16Unorm = 123

16-bit unsigned floating-point depth data format with normalized value. Values are in the [0.0, 1.0] range.

D16UnormS8Uint = 127

16-bit unsigned floating-point depth data format with normalized value, plus 8 bits of stencil in unsigned integer format. Values for depth are in the [0.0, 1.0] range. Values for stencil are in the [0, 255] range.

D24UnormS8Uint = 128

24-bit unsigned floating-point depth data format with normalized value, plus 8 bits of stencil in unsigned integer format. Values for depth are in the [0.0, 1.0] range. Values for stencil are in the [0, 255] range.

D32Sfloat = 125

32-bit signed floating-point depth data format with the value stored as-is.

D32SfloatS8Uint = 129

32-bit signed floating-point depth data format with the value stored as-is, plus 8 bits of stencil in unsigned integer format. Values for stencil are in the [0, 255] range.

E5B9G9R9UfloatPack32 = 122

Unsigned floating-point exposure/blue/green/red data format with the value stored as-is, packed in 32 bits. The format's precision is 5 bits of exposure, 9 bits of blue channel, 9 bits of green channel and 9 bits of red channel.

EacR11G11SnormBlock = 155

11-bit VRAM-compressed signed red/green channel data format with normalized value. Values are in the [-1.0, 1.0] range. Using ETC2 texture compression.

EacR11G11UnormBlock = 154

11-bit VRAM-compressed unsigned red/green channel data format with normalized value. Values are in the [0.0, 1.0] range. Using ETC2 texture compression.

EacR11SnormBlock = 153

11-bit VRAM-compressed signed red channel data format with normalized value. Values are in the [-1.0, 1.0] range. Using ETC2 texture compression.

EacR11UnormBlock = 152

11-bit VRAM-compressed unsigned red channel data format with normalized value. Values are in the [0.0, 1.0] range. Using ETC2 texture compression.

Etc2R8G8B8A1SrgbBlock = 149

VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and nonlinear sRGB encoding. Values are in the [0.0, 1.0] range. Red/green/blue use 8 bit of precision each, with alpha using 1 bit of precision. Using ETC2 texture compression.

Etc2R8G8B8A1UnormBlock = 148

VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the [0.0, 1.0] range. Red/green/blue use 8 bit of precision each, with alpha using 1 bit of precision. Using ETC2 texture compression.

Etc2R8G8B8A8SrgbBlock = 151

VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and nonlinear sRGB encoding. Values are in the [0.0, 1.0] range. Red/green/blue use 8 bits of precision each, with alpha using 8 bits of precision. Using ETC2 texture compression.

Etc2R8G8B8A8UnormBlock = 150

VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the [0.0, 1.0] range. Red/green/blue use 8 bits of precision each, with alpha using 8 bits of precision. Using ETC2 texture compression.

Etc2R8G8B8SrgbBlock = 147

VRAM-compressed unsigned red/green/blue channel data format with normalized value and nonlinear sRGB encoding. Values are in the [0.0, 1.0] range. Using ETC2 texture compression.

Etc2R8G8B8UnormBlock = 146

VRAM-compressed unsigned red/green/blue channel data format with normalized value. Values are in the [0.0, 1.0] range. Using ETC2 texture compression.

G10X6B10X6G10X6R10X6422Unorm4Pack16 = 194

10-bit-per-channel unsigned floating-point green/blue/green/red channel data with normalized value, plus 6 unused bits after each channel, packed in 4×16 bits. Values are in the [0.0, 1.0] range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). The green channel is listed twice, but contains different values to allow it to be represented at full resolution.

G10X6B10X6R10X62Plane420Unorm3Pack16 = 197

10-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 2 separate planes (green + blue/red). Values are in the [0.0, 1.0] range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel).

G10X6B10X6R10X62Plane422Unorm3Pack16 = 199

10-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 3 separate planes (green + blue/red). Values are in the [0.0, 1.0] range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel).

G10X6B10X6R10X63Plane420Unorm3Pack16 = 196

10-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 2 separate planes (green + blue + red). Values are in the [0.0, 1.0] range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel).

G10X6B10X6R10X63Plane422Unorm3Pack16 = 198

10-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 3 separate planes (green + blue + red). Values are in the [0.0, 1.0] range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel).

G10X6B10X6R10X63Plane444Unorm3Pack16 = 200

10-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 3 separate planes (green + blue + red). Values are in the [0.0, 1.0] range.

G12X4B12X4G12X4R12X4422Unorm4Pack16 = 204

12-bit-per-channel unsigned floating-point green/blue/green/red channel data with normalized value, plus 6 unused bits after each channel, packed in 4×16 bits. Values are in the [0.0, 1.0] range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). The green channel is listed twice, but contains different values to allow it to be represented at full resolution.

G12X4B12X4R12X42Plane420Unorm3Pack16 = 207

12-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 2 separate planes (green + blue/red). Values are in the [0.0, 1.0] range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel).

G12X4B12X4R12X42Plane422Unorm3Pack16 = 209

12-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 3 separate planes (green + blue/red). Values are in the [0.0, 1.0] range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel).

G12X4B12X4R12X43Plane420Unorm3Pack16 = 206

12-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 2 separate planes (green + blue + red). Values are in the [0.0, 1.0] range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel).

G12X4B12X4R12X43Plane422Unorm3Pack16 = 208

12-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 3 separate planes (green + blue + red). Values are in the [0.0, 1.0] range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel).

G12X4B12X4R12X43Plane444Unorm3Pack16 = 210

12-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 3 separate planes (green + blue + red). Values are in the [0.0, 1.0] range.

G16B16G16R16422Unorm = 211

16-bit-per-channel unsigned floating-point green/blue/red channel data format with normalized value. Values are in the [0.0, 1.0] range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel).

G16B16R162Plane420Unorm = 214

16-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Stored across 2 separate planes (green + blue/red). Values are in the [0.0, 1.0] range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel).

G16B16R162Plane422Unorm = 216

16-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Stored across 3 separate planes (green + blue/red). Values are in the [0.0, 1.0] range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel).

G16B16R163Plane420Unorm = 213

16-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Stored across 2 separate planes (green + blue + red). Values are in the [0.0, 1.0] range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel).

G16B16R163Plane422Unorm = 215

16-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Stored across 3 separate planes (green + blue + red). Values are in the [0.0, 1.0] range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel).

G16B16R163Plane444Unorm = 217

16-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Stored across 3 separate planes (green + blue + red). Values are in the [0.0, 1.0] range.

G8B8G8R8422Unorm = 184

8-bit-per-channel unsigned floating-point green/blue/red channel data format with normalized value. Values are in the [0.0, 1.0] range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel).

G8B8R82Plane420Unorm = 187

8-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, stored across 2 separate planes (green + blue/red). Values are in the [0.0, 1.0] range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel).

G8B8R82Plane422Unorm = 189

8-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, stored across 2 separate planes (green + blue/red). Values are in the [0.0, 1.0] range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel).

G8B8R83Plane420Unorm = 186

8-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, stored across 3 separate planes (green + blue + red). Values are in the [0.0, 1.0] range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel).

G8B8R83Plane422Unorm = 188

8-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, stored across 2 separate planes (green + blue + red). Values are in the [0.0, 1.0] range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel).

G8B8R83Plane444Unorm = 190

8-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, stored across 3 separate planes. Values are in the [0.0, 1.0] range.

Max = 232

Represents the size of the RenderingDevice.DataFormat enum.

R10X6G10X6B10X6A10X6Unorm4Pack16 = 193

10-bit-per-channel unsigned floating-point red/green/blue/alpha channel data with normalized value, plus 6 unused bits after each channel, packed in 4×16 bits. Values are in the [0.0, 1.0] range.

R10X6G10X6Unorm2Pack16 = 192

10-bit-per-channel unsigned floating-point red/green channel data with normalized value, plus 6 unused bits after each channel, packed in 2×16 bits. Values are in the [0.0, 1.0] range.

R10X6UnormPack16 = 191

10-bit-per-channel unsigned floating-point red channel data with normalized value, plus 6 unused bits, packed in 16 bits. Values are in the [0.0, 1.0] range.

R12X4G12X4B12X4A12X4Unorm4Pack16 = 203

12-bit-per-channel unsigned floating-point red/green/blue/alpha channel data with normalized value, plus 6 unused bits after each channel, packed in 4×16 bits. Values are in the [0.0, 1.0] range.

R12X4G12X4Unorm2Pack16 = 202

12-bit-per-channel unsigned floating-point red/green channel data with normalized value, plus 6 unused bits after each channel, packed in 2×16 bits. Values are in the [0.0, 1.0] range.

R12X4UnormPack16 = 201

12-bit-per-channel unsigned floating-point red channel data with normalized value, plus 6 unused bits, packed in 16 bits. Values are in the [0.0, 1.0] range.

R16G16B16A16Sfloat = 96

16-bit-per-channel signed floating-point red/green/blue/alpha channel data format with the value stored as-is.

R16G16B16A16Sint = 95

16-bit-per-channel signed integer red/green/blue/alpha channel data format. Values are in the [-32767, 32767] range.

R16G16B16A16Snorm = 91

16-bit-per-channel signed floating-point red/green/blue/alpha channel data format with normalized value. Values are in the [-1.0, 1.0] range.

R16G16B16A16Sscaled = 93

16-bit-per-channel signed floating-point red/green/blue/alpha channel data format with scaled value (value is converted from integer to float). Values are in the [-32767.0, 32767.0] range.

R16G16B16A16Uint = 94

16-bit-per-channel unsigned integer red/green/blue/alpha channel data format. Values are in the [0.0, 65535] range.

R16G16B16A16Unorm = 90

16-bit-per-channel unsigned floating-point red/green/blue/alpha channel data format with normalized value. Values are in the [0.0, 1.0] range.

R16G16B16A16Uscaled = 92

16-bit-per-channel unsigned floating-point red/green/blue/alpha channel data format with scaled value (value is converted from integer to float). Values are in the [0.0, 65535.0] range.

R16G16B16Sfloat = 89

16-bit-per-channel signed floating-point red/green/blue channel data format with the value stored as-is.

R16G16B16Sint = 88

16-bit-per-channel signed integer red/green/blue channel data format. Values are in the [-32767, 32767] range.

R16G16B16Snorm = 84

16-bit-per-channel signed floating-point red/green/blue channel data format with normalized value. Values are in the [-1.0, 1.0] range.

R16G16B16Sscaled = 86

16-bit-per-channel signed floating-point red/green/blue channel data format with scaled value (value is converted from integer to float). Values are in the [-32767.0, 32767.0] range.

R16G16B16Uint = 87

16-bit-per-channel unsigned integer red/green/blue channel data format. Values are in the [0.0, 65535] range.

R16G16B16Unorm = 83

16-bit-per-channel unsigned floating-point red/green/blue channel data format with normalized value. Values are in the [0.0, 1.0] range.

R16G16B16Uscaled = 85

16-bit-per-channel unsigned floating-point red/green/blue channel data format with scaled value (value is converted from integer to float). Values are in the [0.0, 65535.0] range.

R16G16Sfloat = 82

16-bit-per-channel signed floating-point red/green channel data format with the value stored as-is.

R16G16Sint = 81

16-bit-per-channel signed integer red/green channel data format. Values are in the [-32767, 32767] range.

R16G16Snorm = 77

16-bit-per-channel signed floating-point red/green channel data format with normalized value. Values are in the [-1.0, 1.0] range.

R16G16Sscaled = 79

16-bit-per-channel signed floating-point red/green channel data format with scaled value (value is converted from integer to float). Values are in the [-32767.0, 32767.0] range.

R16G16Uint = 80

16-bit-per-channel unsigned integer red/green channel data format. Values are in the [0.0, 65535] range.

R16G16Unorm = 76

16-bit-per-channel unsigned floating-point red/green channel data format with normalized value. Values are in the [0.0, 1.0] range.

R16G16Uscaled = 78

16-bit-per-channel unsigned floating-point red/green channel data format with scaled value (value is converted from integer to float). Values are in the [0.0, 65535.0] range.

R16Sfloat = 75

16-bit-per-channel signed floating-point red channel data format with the value stored as-is.

R16Sint = 74

16-bit-per-channel signed integer red channel data format. Values are in the [-32767, 32767] range.

R16Snorm = 70

16-bit-per-channel signed floating-point red channel data format with normalized value. Values are in the [-1.0, 1.0] range.

R16Sscaled = 72

16-bit-per-channel signed floating-point red channel data format with scaled value (value is converted from integer to float). Values are in the [-32767.0, 32767.0] range.

R16Uint = 73

16-bit-per-channel unsigned integer red channel data format. Values are in the [0.0, 65535] range.

R16Unorm = 69

16-bit-per-channel unsigned floating-point red channel data format with normalized value. Values are in the [0.0, 1.0] range.

R16Uscaled = 71

16-bit-per-channel unsigned floating-point red channel data format with scaled value (value is converted from integer to float). Values are in the [0.0, 65535.0] range.

R32G32B32A32Sfloat = 108

32-bit-per-channel signed floating-point red/green/blue/alpha channel data format with the value stored as-is.

R32G32B32A32Sint = 107

32-bit-per-channel signed integer red/green/blue/alpha channel data format. Values are in the [2^31 + 1, 2^31 - 1] range.

R32G32B32A32Uint = 106

32-bit-per-channel unsigned integer red/green/blue/alpha channel data format. Values are in the [0, 2^32 - 1] range.

R32G32B32Sfloat = 105

32-bit-per-channel signed floating-point red/green/blue channel data format with the value stored as-is.

R32G32B32Sint = 104

32-bit-per-channel signed integer red/green/blue channel data format. Values are in the [2^31 + 1, 2^31 - 1] range.

R32G32B32Uint = 103

32-bit-per-channel unsigned integer red/green/blue channel data format. Values are in the [0, 2^32 - 1] range.

R32G32Sfloat = 102

32-bit-per-channel signed floating-point red/green channel data format with the value stored as-is.

R32G32Sint = 101

32-bit-per-channel signed integer red/green channel data format. Values are in the [2^31 + 1, 2^31 - 1] range.

R32G32Uint = 100

32-bit-per-channel unsigned integer red/green channel data format. Values are in the [0, 2^32 - 1] range.

R32Sfloat = 99

32-bit-per-channel signed floating-point red channel data format with the value stored as-is.

R32Sint = 98

32-bit-per-channel signed integer red channel data format. Values are in the [2^31 + 1, 2^31 - 1] range.

R32Uint = 97

32-bit-per-channel unsigned integer red channel data format. Values are in the [0, 2^32 - 1] range.

R4G4B4A4UnormPack16 = 1

4-bit-per-channel red/green/blue/alpha channel data format, packed into 16 bits. Values are in the [0.0, 1.0] range.

R4G4UnormPack8 = 0

4-bit-per-channel red/green channel data format, packed into 8 bits. Values are in the [0.0, 1.0] range. Note: More information on all data formats can be found on the Identification of formats section of the Vulkan specification, as well as the VkFormat(https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkFormat.html) enum.

R5G5B5A1UnormPack16 = 5

Red/green/blue/alpha channel data format with 5 bits of red, 6 bits of green, 5 bits of blue and 1 bit of alpha, packed into 16 bits. Values are in the [0.0, 1.0] range.

R5G6B5UnormPack16 = 3

Red/green/blue channel data format with 5 bits of red, 6 bits of green and 5 bits of blue, packed into 16 bits. Values are in the [0.0, 1.0] range.

R64G64B64A64Sfloat = 120

64-bit-per-channel signed floating-point red/green/blue/alpha channel data format with the value stored as-is.

R64G64B64A64Sint = 119

64-bit-per-channel signed integer red/green/blue/alpha channel data format. Values are in the [2^63 + 1, 2^63 - 1] range.

R64G64B64A64Uint = 118

64-bit-per-channel unsigned integer red/green/blue/alpha channel data format. Values are in the [0, 2^64 - 1] range.

R64G64B64Sfloat = 117

64-bit-per-channel signed floating-point red/green/blue channel data format with the value stored as-is.

R64G64B64Sint = 116

64-bit-per-channel signed integer red/green/blue channel data format. Values are in the [2^63 + 1, 2^63 - 1] range.

R64G64B64Uint = 115

64-bit-per-channel unsigned integer red/green/blue channel data format. Values are in the [0, 2^64 - 1] range.

R64G64Sfloat = 114

64-bit-per-channel signed floating-point red/green channel data format with the value stored as-is.

R64G64Sint = 113

64-bit-per-channel signed integer red/green channel data format. Values are in the [2^63 + 1, 2^63 - 1] range.

R64G64Uint = 112

64-bit-per-channel unsigned integer red/green channel data format. Values are in the [0, 2^64 - 1] range.

R64Sfloat = 111

64-bit-per-channel signed floating-point red channel data format with the value stored as-is.

R64Sint = 110

64-bit-per-channel signed integer red channel data format. Values are in the [2^63 + 1, 2^63 - 1] range.

R64Uint = 109

64-bit-per-channel unsigned integer red channel data format. Values are in the [0, 2^64 - 1] range.

R8G8B8A8Sint = 41

8-bit-per-channel signed integer red/green/blue/alpha channel data format. Values are in the [-127, 127] range.

R8G8B8A8Snorm = 37

8-bit-per-channel signed floating-point red/green/blue/alpha channel data format with normalized value. Values are in the [-1.0, 1.0] range.

R8G8B8A8Srgb = 42

8-bit-per-channel unsigned floating-point red/green/blue/alpha channel data format with normalized value and nonlinear sRGB encoding. Values are in the [0.0, 1.0] range.

R8G8B8A8Sscaled = 39

8-bit-per-channel signed floating-point red/green/blue/alpha channel data format with scaled value (value is converted from integer to float). Values are in the [-127.0, 127.0] range.

R8G8B8A8Uint = 40

8-bit-per-channel unsigned integer red/green/blue/alpha channel data format. Values are in the [0, 255] range.

R8G8B8A8Unorm = 36

8-bit-per-channel unsigned floating-point red/green/blue/alpha channel data format with normalized value. Values are in the [0.0, 1.0] range.

R8G8B8A8Uscaled = 38

8-bit-per-channel unsigned floating-point red/green/blue/alpha channel data format with scaled value (value is converted from integer to float). Values are in the [0.0, 255.0] range.

R8G8B8Sint = 27

8-bit-per-channel signed integer red/green/blue channel data format. Values are in the [-127, 127] range.

R8G8B8Snorm = 23

8-bit-per-channel signed floating-point red/green/blue channel data format with normalized value. Values are in the [-1.0, 1.0] range.

R8G8B8Srgb = 28

8-bit-per-channel unsigned floating-point red/green/blue channel data format with normalized value and nonlinear sRGB encoding. Values are in the [0.0, 1.0] range.

R8G8B8Sscaled = 25

8-bit-per-channel signed floating-point red/green/blue channel data format with scaled value (value is converted from integer to float). Values are in the [-127.0, 127.0] range.

R8G8B8Uint = 26

8-bit-per-channel unsigned integer red/green/blue channel data format. Values are in the [0, 255] range.

R8G8B8Unorm = 22

8-bit-per-channel unsigned floating-point red/green/blue channel data format with normalized value. Values are in the [0.0, 1.0] range.

R8G8B8Uscaled = 24

8-bit-per-channel unsigned floating-point red/green/blue channel data format with scaled value (value is converted from integer to float). Values are in the [0.0, 255.0] range.

R8G8Sint = 20

8-bit-per-channel signed integer red/green channel data format. Values are in the [-127, 127] range.

R8G8Snorm = 16

8-bit-per-channel signed floating-point red/green channel data format with normalized value. Values are in the [-1.0, 1.0] range.

R8G8Srgb = 21

8-bit-per-channel unsigned floating-point red/green channel data format with normalized value and nonlinear sRGB encoding. Values are in the [0.0, 1.0] range.

R8G8Sscaled = 18

8-bit-per-channel signed floating-point red/green channel data format with scaled value (value is converted from integer to float). Values are in the [-127.0, 127.0] range.

R8G8Uint = 19

8-bit-per-channel unsigned integer red/green channel data format. Values are in the [0, 255] range.

R8G8Unorm = 15

8-bit-per-channel unsigned floating-point red/green channel data format with normalized value. Values are in the [0.0, 1.0] range.

R8G8Uscaled = 17

8-bit-per-channel unsigned floating-point red/green channel data format with scaled value (value is converted from integer to float). Values are in the [0.0, 255.0] range.

R8Sint = 13

8-bit-per-channel signed integer red channel data format. Values are in the [-127, 127] range.

R8Snorm = 9

8-bit-per-channel signed floating-point red channel data format with normalized value. Values are in the [-1.0, 1.0] range.

R8Srgb = 14

8-bit-per-channel unsigned floating-point red channel data format with normalized value and nonlinear sRGB encoding. Values are in the [0.0, 1.0] range.

R8Sscaled = 11

8-bit-per-channel signed floating-point red channel data format with scaled value (value is converted from integer to float). Values are in the [-127.0, 127.0] range.

R8Uint = 12

8-bit-per-channel unsigned integer red channel data format. Values are in the [0, 255] range.

R8Unorm = 8

8-bit-per-channel unsigned floating-point red channel data format with normalized value. Values are in the [0.0, 1.0] range.

R8Uscaled = 10

8-bit-per-channel unsigned floating-point red channel data format with scaled value (value is converted from integer to float). Values are in the [0.0, 255.0] range.

S8Uint = 126

8-bit unsigned integer stencil data format.

X8D24UnormPack32 = 124

24-bit unsigned floating-point depth data format with normalized value, plus 8 unused bits, packed in 32 bits. Values for depth are in the [0.0, 1.0] range.

RenderingDevice.DeviceType

ValueDescription
Cpu = 4

Rendering device is provided by software emulation (such as Lavapipe or SwiftShader(https://github.com/google/swiftshader)). This is the slowest kind of rendering device available; it's typically much slower than RenderingDevice.DeviceType.IntegratedGpu.

DiscreteGpu = 2

Rendering device is a dedicated GPU, which is typically (but not always) faster than integrated GPUs (RenderingDevice.DeviceType.IntegratedGpu).

IntegratedGpu = 1

Rendering device is an integrated GPU, which is typically (but not always) slower than dedicated GPUs (RenderingDevice.DeviceType.DiscreteGpu). On Android and iOS, the rendering device type is always considered to be RenderingDevice.DeviceType.IntegratedGpu.

Max = 5

Represents the size of the RenderingDevice.DeviceType enum.

Other = 0

Rendering device type does not match any of the other enum values or is unknown.

VirtualGpu = 3

Rendering device is an emulated GPU in a virtual environment. This is typically much slower than the host GPU, which means the expected performance level on a dedicated GPU will be roughly equivalent to RenderingDevice.DeviceType.IntegratedGpu. Virtual machine GPU passthrough (such as VFIO) will not report the device type as RenderingDevice.DeviceType.VirtualGpu. Instead, the host GPU's device type will be reported as if the GPU was not emulated.

RenderingDevice.DrawFlags

ValueDescription
ClearAll = 327935

Clear all attachments.

ClearColor0 = 1

Clear the first color attachment.

ClearColor1 = 2

Clear the second color attachment.

ClearColor2 = 4

Clear the third color attachment.

ClearColor3 = 8

Clear the fourth color attachment.

ClearColor4 = 16

Clear the fifth color attachment.

ClearColor5 = 32

Clear the sixth color attachment.

ClearColor6 = 64

Clear the seventh color attachment.

ClearColor7 = 128

Clear the eighth color attachment.

ClearColorAll = 255

Clear all color attachments.

ClearColorMask = 255

Mask for clearing all color attachments.

ClearDepth = 65536

Clear the depth attachment.

ClearStencil = 262144

Clear the stencil attachment.

DefaultAll = 0

Do not clear or ignore any attachments.

IgnoreAll = 720640

Ignore the previous contents of all attachments.

IgnoreColor0 = 256

Ignore the previous contents of the first color attachment.

IgnoreColor1 = 512

Ignore the previous contents of the second color attachment.

IgnoreColor2 = 1024

Ignore the previous contents of the third color attachment.

IgnoreColor3 = 2048

Ignore the previous contents of the fourth color attachment.

IgnoreColor4 = 4096

Ignore the previous contents of the fifth color attachment.

IgnoreColor5 = 8192

Ignore the previous contents of the sixth color attachment.

IgnoreColor6 = 16384

Ignore the previous contents of the seventh color attachment.

IgnoreColor7 = 32768

Ignore the previous contents of the eighth color attachment.

IgnoreColorAll = 65280

Ignore the previous contents of all color attachments.

IgnoreColorMask = 65280

Mask for ignoring all the previous contents of the color attachments.

IgnoreDepth = 131072

Ignore the previous contents of the depth attachment.

IgnoreStencil = 524288

Ignore the previous contents of the stencil attachment.

RenderingDevice.DriverResource

ValueDescription
Buffer = 10

Buffer of any kind of (storage, vertex, etc.).

  • Vulkan: VkBuffer.
  • D3D12: ID3D12Resource.
CommandQueue = 3

The main graphics-compute command queue (rid parameter is ignored).

  • Vulkan: VkQueue.
  • D3D12: ID3D12CommandQueue.
  • Metal: MTLCommandQueue.
ComputePipeline = 11
  • Vulkan: VkPipeline.
  • Metal: MTLComputePipelineState.
LogicalDevice = 0

Specific device object based on a physical device (rid parameter is ignored).

  • Vulkan: Vulkan device driver resource (VkDevice).
  • D3D12: D3D12 device driver resource (ID3D12Device).
  • Metal: Metal device driver resource (MTLDevice).
PhysicalDevice = 1

Physical device the specific logical device is based on (rid parameter is ignored).

  • Vulkan: VkPhysicalDevice.
  • D3D12: IDXGIAdapter.
QueueFamily = 4

The specific family the main queue belongs to (rid parameter is ignored).

  • Vulkan: The queue family index, a uint32_t.
RenderPipeline = 12
  • Vulkan: VkPipeline.
  • Metal: MTLRenderPipelineState.
Sampler = 8
  • Vulkan: VkSampler.
Texture = 5
  • Vulkan: VkImage.
  • D3D12: ID3D12Resource.
TextureDataFormat = 7

The native id of the data format of the texture.

  • Vulkan: VkFormat.
  • D3D12: DXGI_FORMAT.
TextureView = 6

The view of an owned or shared texture.

  • Vulkan: VkImageView.
  • D3D12: ID3D12Resource.
TopmostObject = 2

Top-most graphics API entry object (rid parameter is ignored).

  • Vulkan: VkInstance.
UniformSet = 9
  • Vulkan: VkDescriptorSet.
VulkanBuffer = 10
VulkanComputePipeline = 11
VulkanDescriptorSet = 9
VulkanDevice = 0
VulkanImage = 5
VulkanImageNativeTextureFormat = 7
VulkanImageView = 6
VulkanInstance = 2
VulkanPhysicalDevice = 1
VulkanQueue = 3
VulkanQueueFamilyIndex = 4
VulkanRenderPipeline = 12
VulkanSampler = 8

RenderingDevice.Features

ValueDescription
BufferDeviceAddress = 6

Features support for buffer device address extension.

HdrOutput = 13

Support for high dynamic range (HDR) output.

ImageAtomic32Bit = 7

Support for 32-bit image atomic operations.

MetalfxSpatial = 3

Support for MetalFX spatial upscaling.

MetalfxTemporal = 4

Support for MetalFX temporal upscaling.

RasterizationRateMap = 14

Support for rasterization rate maps. The current implementation targets Metal on Apple platforms. This allows for foveated rendering, which is used by the visionOS XR module.

RayQuery = 11

Support for ray query extension.

Note: This is currently only supported when using Vulkan. This is not supported on macOS and iOS (even on hardware supporting raytracing) due to MoltenVK limitations.

RaytracingPipeline = 12

Support for raytracing pipeline extension.

Note: This is currently only supported when using Vulkan. This is not supported on macOS and iOS (even on hardware supporting raytracing) due to MoltenVK limitations.

RenderingDevice.FinalAction

ValueDescription
Continue = 0
Discard = 1

Discard the contents of the framebuffer. This is the fastest option if you don't need to use the results of the draw list.

Max = 2

Represents the size of the RenderingDevice.FinalAction enum.

Read = 0
Store = 0

Store the result of the draw list in the framebuffer. This is generally what you want to do.

RenderingDevice.IndexBufferFormat

ValueDescription
Uint16 = 0

Index buffer in 16-bit unsigned integer format. This limits the maximum index that can be specified to 65535.

Uint32 = 1

Index buffer in 32-bit unsigned integer format. This limits the maximum index that can be specified to 4294967295.

RenderingDevice.InitialAction

ValueDescription
Clear = 1

Clear the whole framebuffer or its specified region.

ClearRegion = 1
ClearRegionContinue = 1
Continue = 0
Discard = 2

Ignore the previous contents of the framebuffer. This is the fastest option if you'll overwrite all of the pixels and don't need to read any of them.

Drop = 2
Keep = 0
Load = 0

Load the previous contents of the framebuffer.

Max = 3

Represents the size of the RenderingDevice.InitialAction enum.

RenderingDevice.Limit

ValueDescription
MaxBoundUniformSets = 0

Maximum number of uniform sets that can be bound at a given time.

MaxComputeSharedMemorySize = 27

Maximum shared memory size for compute shaders.

MaxComputeWorkgroupCountX = 28

Maximum number of workgroups for compute shaders on the X axis.

MaxComputeWorkgroupCountY = 29

Maximum number of workgroups for compute shaders on the Y axis.

MaxComputeWorkgroupCountZ = 30

Maximum number of workgroups for compute shaders on the Z axis.

MaxComputeWorkgroupInvocations = 31

Maximum number of workgroup invocations for compute shaders.

MaxComputeWorkgroupSizeX = 32

Maximum workgroup size for compute shaders on the X axis.

MaxComputeWorkgroupSizeY = 33

Maximum workgroup size for compute shaders on the Y axis.

MaxComputeWorkgroupSizeZ = 34

Maximum workgroup size for compute shaders on the Z axis.

MaxDrawIndexedIndex = 7

Maximum index for an indexed draw command.

MaxFramebufferColorAttachments = 1

Maximum number of color framebuffer attachments that can be used at a given time.

MaxFramebufferHeight = 8

Maximum height of a framebuffer (in pixels).

MaxFramebufferWidth = 9

Maximum width of a framebuffer (in pixels).

MaxPushConstantSize = 20

Maximum size of a push constant. A lot of devices are limited to 128 bytes, so try to avoid exceeding 128 bytes in push constants to ensure compatibility even if your GPU is reporting a higher value.

MaxSamplersPerShaderStage = 16

Maximum number of samplers per shader stage.

MaxSamplersPerUniformSet = 3

Maximum number of samplers that can be used per uniform set.

MaxStorageBuffersPerShaderStage = 17

Maximum number of storage buffers per shader stage.

MaxStorageBuffersPerUniformSet = 4

Maximum number of storage buffers per uniform set.

MaxStorageImagesPerShaderStage = 18

Maximum number of storage images per shader stage.

MaxStorageImagesPerUniformSet = 5

Maximum number of storage images per uniform set.

MaxTextureArrayLayers = 10

Maximum number of texture array layers.

MaxTextureSize1D = 11

Maximum supported 1-dimensional texture size (in pixels on a single axis).

MaxTextureSize2D = 12

Maximum supported 2-dimensional texture size (in pixels on a single axis).

MaxTextureSize3D = 13

Maximum supported 3-dimensional texture size (in pixels on a single axis).

MaxTextureSizeCube = 14

Maximum supported cubemap texture size (in pixels on a single axis of a single face).

MaxTexturesPerShaderStage = 15

Maximum number of textures per shader stage.

MaxTexturesPerUniformSet = 2

Maximum number of textures that can be used per uniform set.

MaxUniformBufferSize = 21

Maximum size of a uniform buffer.

MaxUniformBuffersPerShaderStage = 19

Maximum number of uniform buffers per uniform set.

MaxUniformBuffersPerUniformSet = 6

Maximum number of uniform buffers per uniform set.

MaxVertexInputAttributeOffset = 22

Maximum vertex input attribute offset.

MaxVertexInputAttributes = 23

Maximum number of vertex input attributes.

MaxVertexInputBindingStride = 25

Maximum vertex input binding stride.

MaxVertexInputBindings = 24

Maximum number of vertex input bindings.

MaxViewportDimensionsX = 35

Maximum viewport width (in pixels).

MaxViewportDimensionsY = 36

Maximum viewport height (in pixels).

MetalfxTemporalScalerMaxScale = 47

Returns the largest value for ProjectSettings.rendering/scaling_3d/scale when using the MetalFX temporal upscaler. Note: The returned value is multiplied by a factor of 1000000 to preserve 6 digits of precision. It must be divided by 1000000.0 to convert the value to a floating point number.

MetalfxTemporalScalerMinScale = 46

Returns the smallest value for ProjectSettings.rendering/scaling_3d/scale when using the MetalFX temporal upscaler. Note: The returned value is multiplied by a factor of 1000000 to preserve 6 digits of precision. It must be divided by 1000000.0 to convert the value to a floating point number.

MinUniformBufferOffsetAlignment = 26

Minimum uniform buffer offset alignment.

RenderingDevice.LogicOperation

ValueDescription
And = 1

AND logic operation.

AndInverted = 4

AND logic operation with the source operand being inverted. See also RenderingDevice.LogicOperation.AndReverse.

AndReverse = 2

AND logic operation with the destination operand being inverted. See also RenderingDevice.LogicOperation.AndInverted.

Clear = 0

Clear logic operation (result is always 0). See also RenderingDevice.LogicOperation.Set.

Copy = 3

Copy logic operation (keeps the source value as-is). See also RenderingDevice.LogicOperation.CopyInverted and RenderingDevice.LogicOperation.NoOp.

CopyInverted = 12

NOT logic operation (inverts the value). See also RenderingDevice.LogicOperation.Copy.

Equivalent = 9

Not-XOR (XNOR) logic operation.

Invert = 10

Invert logic operation.

Max = 16

Represents the size of the RenderingDevice.LogicOperation enum.

Nand = 14

Not-AND (NAND) logic operation.

NoOp = 5

No-op logic operation (keeps the destination value as-is). See also RenderingDevice.LogicOperation.Copy.

Nor = 8

Not-OR (NOR) logic operation.

Or = 7

OR logic operation.

OrInverted = 13

OR logic operation with the source operand being inverted. See also RenderingDevice.LogicOperation.OrReverse.

OrReverse = 11

OR logic operation with the destination operand being inverted. See also RenderingDevice.LogicOperation.OrReverse.

Set = 15

SET logic operation (result is always 1). See also RenderingDevice.LogicOperation.Clear.

Xor = 6

Exclusive or (XOR) logic operation.

RenderingDevice.MemoryType

ValueDescription
Buffers = 1

Memory taken by buffers.

Textures = 0

Memory taken by textures.

Total = 2

Total memory taken. This is greater than the sum of RenderingDevice.MemoryType.Textures and RenderingDevice.MemoryType.Buffers, as it also includes miscellaneous memory usage.

RenderingDevice.PipelineDynamicStateFlags

ValueDescription
BlendConstants = 4
DepthBias = 2

Allows dynamically changing the depth bias.

DepthBounds = 8
LineWidth = 1

Allows dynamically changing the width of rendering lines.

StencilCompareMask = 16
StencilReference = 64
StencilWriteMask = 32

RenderingDevice.PipelineSpecializationConstantType

ValueDescription
Bool = 0

Boolean specialization constant.

Float = 2

Floating-point specialization constant.

Int = 1

Integer specialization constant.

RenderingDevice.PolygonCullMode

ValueDescription
Back = 2

Use polygon backface culling (faces pointing away from the camera are hidden).

Disabled = 0

Do not use polygon front face or backface culling.

Front = 1

Use polygon frontface culling (faces pointing towards the camera are hidden).

RenderingDevice.PolygonFrontFace

ValueDescription
Clockwise = 0

Clockwise winding order to determine which face of a polygon is its front face.

CounterClockwise = 1

Counter-clockwise winding order to determine which face of a polygon is its front face.

RenderingDevice.RenderPrimitive

ValueDescription
Lines = 1

Line list rendering primitive. Lines are drawn separated from each other.

LinesWithAdjacency = 2

Line list rendering primitive with adjacency. Note: Adjacency is only useful with geometry shaders, which Reckfell does not expose.

Linestrips = 3

Line strip rendering primitive. Lines drawn are connected to the previous vertex.

LinestripsWithAdjacency = 4

Line strip rendering primitive with adjacency. Note: Adjacency is only useful with geometry shaders, which Reckfell does not expose.

Max = 11

Represents the size of the RenderingDevice.RenderPrimitive enum.

Points = 0

Point rendering primitive (with constant size, regardless of distance from camera).

TesselationPatch = 10

Tessellation patch rendering primitive. Only useful with tessellation shaders, which can be used to deform these patches.

TriangleStrips = 7

Triangle strip rendering primitive. Triangles drawn are connected to the previous triangle.

TriangleStripsWithAjacency = 8

Triangle strip rendering primitive with adjacency. Note: Adjacency is only useful with geometry shaders, which Reckfell does not expose.

TriangleStripsWithRestartIndex = 9

Triangle strip rendering primitive with primitive restart enabled. Triangles drawn are connected to the previous triangle, but a primitive restart index can be specified before drawing to create a second triangle strip after the specified index. Note: Only compatible with indexed draws.

Triangles = 5

Triangle list rendering primitive. Triangles are drawn separated from each other.

TrianglesWithAdjacency = 6

Triangle list rendering primitive with adjacency. Note: Adjacency is only useful with geometry shaders, which Reckfell does not expose.

RenderingDevice.SamplerBorderColor

ValueDescription
FloatOpaqueBlack = 2

Return a floating-point opaque black color when sampling outside the [RenderingDevice.SamplerRepeatMode.ClampToBorder`](/en/docs/api/renderingdevice#member-clamptoborder-c0127e60c8).

FloatOpaqueWhite = 4

Return a floating-point opaque white color when sampling outside the [RenderingDevice.SamplerRepeatMode.ClampToBorder`](/en/docs/api/renderingdevice#member-clamptoborder-c0127e60c8).

FloatTransparentBlack = 0

Return a floating-point transparent black color when sampling outside the [RenderingDevice.SamplerRepeatMode.ClampToBorder`](/en/docs/api/renderingdevice#member-clamptoborder-c0127e60c8).

IntOpaqueBlack = 3

Return an integer opaque black color when sampling outside the [RenderingDevice.SamplerRepeatMode.ClampToBorder`](/en/docs/api/renderingdevice#member-clamptoborder-c0127e60c8).

IntOpaqueWhite = 5

Return an integer opaque white color when sampling outside the [RenderingDevice.SamplerRepeatMode.ClampToBorder`](/en/docs/api/renderingdevice#member-clamptoborder-c0127e60c8).

IntTransparentBlack = 1

Return an integer transparent black color when sampling outside the [RenderingDevice.SamplerRepeatMode.ClampToBorder`](/en/docs/api/renderingdevice#member-clamptoborder-c0127e60c8).

Max = 6

Represents the size of the RenderingDevice.SamplerBorderColor enum.

RenderingDevice.SamplerFilter

ValueDescription
Linear = 1

Bilinear sampler filtering. Sampling at higher resolutions than the source will result in a blurry look.

Nearest = 0

Nearest-neighbor sampler filtering. Sampling at higher resolutions than the source will result in a pixelated look.

RenderingDevice.SamplerRepeatMode

ValueDescription
ClampToBorder = 3

Sample with repeating disabled. When sampling outside the [RDSamplerState.BorderColor`](/en/docs/api/rdsamplerstate#member-bordercolor-6ccdb88f0e).

ClampToEdge = 2

Sample with repeating disabled. When sampling outside the [0.0, 1.0] range, return the color of the last pixel on the edge.

Max = 5

Represents the size of the RenderingDevice.SamplerRepeatMode enum.

MirrorClampToEdge = 4

Sample with mirrored repeating enabled, but only once. When sampling in the [-1.0, 0.0] range, return a mirrored version of the sampler. When sampling outside the [-1.0, 1.0] range, return the color of the last pixel on the edge.

MirroredRepeat = 1

Sample with mirrored repeating enabled. When sampling outside the [0.0, 1.0] range, return a mirrored version of the sampler. This mirrored version is mirrored again if sampling further away, with the pattern repeating indefinitely.

Repeat = 0

Sample with repeating enabled.

RenderingDevice.ShaderLanguage

ValueDescription
Glsl = 0

Khronos' GLSL shading language (used natively by OpenGL and Vulkan). This is the language used for core Reckfell shaders.

Hlsl = 1

Microsoft's High-Level Shading Language (used natively by Direct3D, but can also be used in Vulkan).

RenderingDevice.ShaderStage

ValueDescription
AnyHit = 6

Any hit shader stage. Invoked when ray intersections are not opaque. This can be used to specify what happens when a ray hits any of the geometry in the scene.

AnyHitBit = 64

Any hit shader stage bit (see also RenderingDevice.ShaderStage.AnyHit).

ClosestHit = 7

Closest hit shader stage. This can be used to specify what happens when a ray hits the closest geometry in the scene.

ClosestHitBit = 128

Closest hit shader stage bit (see also RenderingDevice.ShaderStage.ClosestHit).

Compute = 4

Compute shader stage. This can be used to run arbitrary computing tasks in a shader, performing them on the GPU instead of the CPU.

ComputeBit = 16

Compute shader stage bit (see also RenderingDevice.ShaderStage.Compute).

Fragment = 1

Fragment shader stage (called "pixel shader" in Direct3D). This can be used to manipulate pixels from a shader.

FragmentBit = 2

Fragment shader stage bit (see also RenderingDevice.ShaderStage.Fragment).

Intersection = 9

Intersection shader stage. The intersection shader for triangles is built-in. This can be used to compute ray intersections with primitives that are not triangles.

IntersectionBit = 512

Intersection shader stage bit (see also RenderingDevice.ShaderStage.Intersection).

Max = 10

Represents the size of the RenderingDevice.ShaderStage enum.

Miss = 8

Miss shader stage. This can be used to specify what happens if a ray does not hit anything in the scene.

MissBit = 256

Miss shader stage bit (see also RenderingDevice.ShaderStage.Miss).

Raygen = 5

Ray generation shader stage. This can be used to generate primary rays.

RaygenBit = 32

Ray generation shader stage bit (see also RenderingDevice.ShaderStage.Raygen).

TesselationControl = 2

Tessellation control shader stage. This can be used to create additional geometry from a shader.

TesselationControlBit = 4

Tessellation control shader stage bit (see also RenderingDevice.ShaderStage.TesselationControl).

TesselationEvaluation = 3

Tessellation evaluation shader stage. This can be used to create additional geometry from a shader.

TesselationEvaluationBit = 8

Tessellation evaluation shader stage bit (see also RenderingDevice.ShaderStage.TesselationEvaluation).

Vertex = 0

Vertex shader stage. This can be used to manipulate vertices from a shader (but not create new vertices).

VertexBit = 1

Vertex shader stage bit (see also RenderingDevice.ShaderStage.Vertex).

RenderingDevice.StencilOperation

ValueDescription
DecrementAndClamp = 4

Decrement the existing stencil value and clamp to the minimum value if reached. Stencil bits are considered as an unsigned integer.

DecrementAndWrap = 7

Decrement the stencil value and wrap around to the maximum representable unsigned if reaching the minimum. Stencil bits are considered as an unsigned integer.

IncrementAndClamp = 3

Increment the existing stencil value and clamp to the maximum representable unsigned value if reached. Stencil bits are considered as an unsigned integer.

IncrementAndWrap = 6

Increment the stencil value and wrap around to 0 if reaching the maximum representable unsigned. Stencil bits are considered as an unsigned integer.

Invert = 5

Bitwise-invert the existing stencil value.

Keep = 0

Keep the current stencil value.

Max = 8

Represents the size of the RenderingDevice.StencilOperation enum.

Replace = 2

Replace the existing stencil value with the new one.

Zero = 1

Set the stencil value to 0.

RenderingDevice.StorageBufferUsage

ValueDescription
Indirect = 1

RenderingDevice.TextureSamples

ValueDescription
Max = 7

Represents the size of the RenderingDevice.TextureSamples enum.

Samples1 = 0

Perform 1 texture sample (this is the fastest but lowest-quality for antialiasing).

Samples16 = 4

Perform 16 texture samples. Not supported on mobile GPUs and many desktop GPUs.

Samples2 = 1

Perform 2 texture samples.

Samples32 = 5

Perform 32 texture samples. Not supported on most GPUs.

Samples4 = 2

Perform 4 texture samples.

Samples64 = 6

Perform 64 texture samples (this is the slowest but highest-quality for antialiasing). Not supported on most GPUs.

Samples8 = 3

Perform 8 texture samples. Not supported on mobile GPUs (including Apple Silicon).

RenderingDevice.TextureSliceType

ValueDescription
Cubemap = 1

Cubemap texture slice.

Slice2D = 0

2-dimensional texture slice.

Slice2DArray = 3

2-dimensional texture array slice.

Slice3D = 2

3-dimensional texture slice.

RenderingDevice.TextureSwizzle

ValueDescription
A = 6

Sample the alpha channel.

B = 5

Sample the blue color channel.

G = 4

Sample the green color channel.

Identity = 0

Return the sampled value as-is.

Max = 7

Represents the size of the RenderingDevice.TextureSwizzle enum.

One = 2

Always return 1.0 when sampling.

R = 3

Sample the red color channel.

Zero = 1

Always return 0.0 when sampling.

RenderingDevice.TextureType

ValueDescription
Cube = 3

Cubemap texture.

CubeArray = 6

Array of Cubemap textures.

Max = 7

Represents the size of the RenderingDevice.TextureType enum.

Type1D = 0

1-dimensional texture.

Type1DArray = 4

Array of 1-dimensional textures.

Type2D = 1

2-dimensional texture.

Type2DArray = 5

Array of 2-dimensional textures.

Type3D = 2

3-dimensional texture.

RenderingDevice.TextureUsageBits

ValueDescription
CanCopyFromBit = 128

Texture can be a source for RenderingDevice.TextureCopy.

CanCopyToBit = 256

Texture can be a destination for RenderingDevice.TextureCopy.

CanUpdateBit = 64

Texture can be updated using RenderingDevice.TextureUpdate.

ColorAttachmentBit = 2

Texture can be used as a color attachment in a framebuffer.

CpuReadBit = 32

Texture can be read back on the CPU using RenderingDevice.TextureGetData faster than without this bit, since it is always kept in the system memory.

DepthResolveAttachmentBit = 4096

Texture can be used as a depth/stencil resolve attachment in a framebuffer.

DepthStencilAttachmentBit = 4

Texture can be used as a depth/stencil attachment in a framebuffer.

InputAttachmentBit = 512

Texture can be used as a input attachment in a framebuffer.

SamplingBit = 1

Texture can be sampled.

StorageAtomicBit = 16

Texture can be used as a storage image with support for atomic operations.

StorageBit = 8

Texture can be used as a storage image.

RenderingDevice.UniformType

ValueDescription
AccelerationStructure = 12

Acceleration structure uniform.

Image = 3

Image uniform.

ImageBuffer = 6

Image buffer uniform.

InputAttachment = 9

Input attachment uniform.

Max = 13

Represents the size of the RenderingDevice.UniformType enum.

Sampler = 0

Sampler uniform.

SamplerWithTexture = 1

Sampler uniform with a texture.

SamplerWithTextureBuffer = 5

Sampler uniform with a texture buffer.

StorageBuffer = 8

Storage buffer uniform.

StorageBufferDynamic = 11

Same as UNIFORM_TYPE_STORAGE_BUFFER but for buffers created with BUFFER_CREATION_DYNAMIC_PERSISTENT_BIT. Note: This flag is not available to ReckfellApi users due to being too dangerous (i.e. wrong usage can result in visual glitches). It's exposed in case ReckfellApi users receive a buffer created with such flag from Reckfell.

Texture = 2

Texture uniform.

TextureBuffer = 4

Texture buffer uniform.

UniformBuffer = 7

Uniform buffer uniform.

UniformBufferDynamic = 10

Same as UNIFORM_TYPE_UNIFORM_BUFFER but for buffers created with BUFFER_CREATION_DYNAMIC_PERSISTENT_BIT. Note: This flag is not available to ReckfellApi users due to being too dangerous (i.e. wrong usage can result in visual glitches). It's exposed in case ReckfellApi users receive a buffer created with such flag from Reckfell.

RenderingDevice.VertexFrequency

ValueDescription
Instance = 1

Vertex attribute addressing is a function of the instance index. This is used to specify the rate at which vertex attributes are pulled from buffers.

Vertex = 0

Vertex attribute addressing is a function of the vertex. This is used to specify the rate at which vertex attributes are pulled from buffers.

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.