RenderingDevice
Low-level device for GPU resources, commands and compute.
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
public void Barrier(RenderingDevice.BarrierMask from = RenderingDevice.BarrierMask.AllBarriers, RenderingDevice.BarrierMask to = RenderingDevice.BarrierMask.AllBarriers);This method does nothing.
| Name | Type | Default |
|---|---|---|
from | RenderingDevice.BarrierMask | RenderingDevice.BarrierMask.AllBarriers |
to | RenderingDevice.BarrierMask | RenderingDevice.BarrierMask.AllBarriers |
BlasBuildError
public Error BlasBuild(Rid blas);Builds the blas.
| Name | Type | Default |
|---|---|---|
blas | Rid | — |
ErrorBlasCreateRid
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.
| Name | Type | Default |
|---|---|---|
geometries | Reckfell.Collections.Array<RDAccelerationStructureGeometry> | — |
flags | RenderingDevice.AccelerationStructureFlagBits | — |
RidBufferClear2 overloads
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:
- the size isn't a multiple of four
- the region specified by
offset+size_bytesexceeds the buffer - a draw list is currently active (created by
RenderingDevice.DrawListBegin) - a compute list is currently active (created by
RenderingDevice.ComputeListBegin)
| Name | Type | Default |
|---|---|---|
buffer | Rid | — |
offset | uint | — |
sizeBytes | uint | — |
Errorpublic 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:
- the size isn't a multiple of four
- the region specified by
offset+size_bytesexceeds the buffer - a draw list is currently active (created by
RenderingDevice.DrawListBegin) - a compute list is currently active (created by
RenderingDevice.ComputeListBegin)
| Name | Type | Default |
|---|---|---|
buffer | Rid | — |
offset | uint | — |
sizeBytes | uint | — |
postBarrier | RenderingDevice.BarrierMask | — |
ErrorBufferCopyError
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:
sizeexceeds the size of eithersrc_bufferordst_bufferat their corresponding offsets- a draw list is currently active (created by
RenderingDevice.DrawListBegin) - a compute list is currently active (created by
RenderingDevice.ComputeListBegin)
| Name | Type | Default |
|---|---|---|
srcBuffer | Rid | — |
dstBuffer | Rid | — |
srcOffset | uint | — |
dstOffset | uint | — |
size | uint | — |
ErrorBufferGetDatabyte[]
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.
| Name | Type | Default |
|---|---|---|
buffer | Rid | — |
offsetBytes | uint | 0 |
sizeBytes | uint | 0 |
bufferBuffer RID from the same device.
offsetBytesStarting byte offset. Specify sizeBytes explicitly when reading from a nonzero offset.
sizeBytesRead size in bytes; 0 selects the full buffer size, not the remainder after offsetBytes.
byte[]Copy of the read bytes; this is a blocking read.
BufferGetDataAsyncError
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.
| Name | Type | Default |
|---|---|---|
buffer | Rid | — |
callback | Callable | — |
offsetBytes | uint | 0 |
sizeBytes | uint | 0 |
ErrorBufferGetDeviceAddressulong
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.
| Name | Type | Default |
|---|---|---|
buffer | Rid | — |
ulongBufferUpdate4 overloads
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.
| Name | Type | Default |
|---|---|---|
buffer | Rid | — |
offset | uint | — |
sizeBytes | uint | — |
data | byte[] | — |
bufferBuffer RID from the same device.
offsetDestination offset in bytes.
sizeBytesNumber of bytes to write; data must contain at least this many bytes.
dataSource bytes, not elements of an arbitrary width.
ErrorError.Ok on successful update, otherwise an error code.
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:
- the region specified by
offset+size_bytesexceeds the buffer - a draw list is currently active (created by
RenderingDevice.DrawListBegin) - a compute list is currently active (created by
RenderingDevice.ComputeListBegin)
| Name | Type | Default |
|---|---|---|
buffer | Rid | — |
offset | uint | — |
sizeBytes | uint | — |
data | byte[] | — |
postBarrier | RenderingDevice.BarrierMask | — |
Errorpublic 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:
- the region specified by
offset+size_bytesexceeds the buffer - a draw list is currently active (created by
RenderingDevice.DrawListBegin) - a compute list is currently active (created by
RenderingDevice.ComputeListBegin)
| Name | Type | Default |
|---|---|---|
buffer | Rid | — |
offset | uint | — |
sizeBytes | uint | — |
data | ReadOnlySpan<byte> | — |
Errorpublic 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:
- the region specified by
offset+size_bytesexceeds the buffer - a draw list is currently active (created by
RenderingDevice.DrawListBegin) - a compute list is currently active (created by
RenderingDevice.ComputeListBegin)
| Name | Type | Default |
|---|---|---|
buffer | Rid | — |
offset | uint | — |
sizeBytes | uint | — |
data | ReadOnlySpan<byte> | — |
postBarrier | RenderingDevice.BarrierMask | — |
ErrorCaptureTimestampvoid
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.
| Name | Type | Default |
|---|---|---|
name | string | — |
ComputeListAddBarriervoid
public void ComputeListAddBarrier(long computeList);Raises a Vulkan compute barrier in the specified compute_list.
| Name | Type | Default |
|---|---|---|
computeList | long | — |
ComputeListBegin2 overloads
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.
longIdentifier for subsequent commands in the active list.
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):
| Name | Type | Default |
|---|---|---|
allowDrawOverlap | bool | — |
longComputeListBindComputePipelinevoid
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.
| Name | Type | Default |
|---|---|---|
computeList | long | — |
computePipeline | Rid | — |
computeListActive compute-list identifier for this device.
computePipelineCompatible compute-pipeline RID from the same device.
ComputeListBindUniformSetvoid
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.
| Name | Type | Default |
|---|---|---|
computeList | long | — |
uniformSet | Rid | — |
setIndex | uint | — |
computeListActive compute-list identifier for this device.
uniformSetUniform-set RID with a layout compatible with the pipeline shader.
setIndexGLSL set index at which to bind the set.
ComputeListDispatchvoid
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.
| Name | Type | Default |
|---|---|---|
computeList | long | — |
xGroups | uint | — |
yGroups | uint | — |
zGroups | uint | — |
computeListActive compute-list identifier for this device.
xGroupsPositive X workgroup count within the device limit.
yGroupsPositive Y workgroup count within the device limit.
zGroupsPositive Z workgroup count within the device limit.
ComputeListDispatchIndirectvoid
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.
| Name | Type | Default |
|---|---|---|
computeList | long | — |
buffer | Rid | — |
offset | uint | — |
ComputeListEnd2 overloads
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.
public void ComputeListEnd(RenderingDevice.BarrierMask postBarrier);Finishes a list of compute commands created with the compute_* methods.
| Name | Type | Default |
|---|---|---|
postBarrier | RenderingDevice.BarrierMask | — |
ComputeListSetPushConstant2 overloads
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).
| Name | Type | Default |
|---|---|---|
computeList | long | — |
buffer | byte[] | — |
sizeBytes | uint | — |
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).
| Name | Type | Default |
|---|---|---|
computeList | long | — |
buffer | ReadOnlySpan<byte> | — |
sizeBytes | uint | — |
ComputePipelineCreateRid
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.
| Name | Type | Default |
|---|---|---|
shader | Rid | — |
specializationConstants | Reckfell.Collections.Array<RDPipelineSpecializationConstant> | null |
shaderSame-device shader RID with the corresponding layout.
specializationConstantsOptional pipeline specialization-constant values.
RidRID of the created device-owned resource; check validity.
ComputePipelineIsValidbool
public bool ComputePipelineIsValid(Rid computePipeline);Returns true if the compute pipeline specified by the compute_pipeline RID is valid, false otherwise.
| Name | Type | Default |
|---|---|---|
computePipeline | Rid | — |
boolCreateLocalDeviceRenderingDevice
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.
RenderingDeviceDrawCommandBeginLabelvoid
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.
| Name | Type | Default |
|---|---|---|
name | string | — |
color | Color | — |
DrawCommandEndLabelvoid
public void DrawCommandEndLabel();Ends the command buffer debug label region started by a RenderingDevice.DrawCommandBeginLabel call.
DrawCommandInsertLabelvoid · Deprecated
public void DrawCommandInsertLabel(string name, Color color);This method does nothing.
| Name | Type | Default |
|---|---|---|
name | string | — |
color | Color | — |
DrawListBegin9 overloads
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.
rd.draw_list_begin(fb[i], RenderingDevice.CLEAR_COLOR_ALL, clear_colors, true, 1.0f, true, 0, Rect2(), RenderingDevice.OPAQUE_PASS | 5)| Name | Type | Default |
|---|---|---|
framebuffer | Rid | — |
drawFlags | RenderingDevice.DrawFlags | RenderingDevice.DrawFlags.DefaultAll |
clearColorValues | Color[] | null |
clearDepthValue | float | 1f |
clearStencilValue | uint | 0 |
region | Rect2? | default |
breadcrumb | uint | 0 |
clearColorValuesIf the parameter is null, then the default value is Array.Empty<Color>().
regionIf the parameter is null, then the default value is new Rect2(new Vector2(0.0f, 0.0f), new Vector2(0.0f, 0.0f)).
longpublic 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.
rd.draw_list_begin(fb[i], RenderingDevice.CLEAR_COLOR_ALL, clear_colors, true, 1.0f, true, 0, Rect2(), RenderingDevice.OPAQUE_PASS | 5)| Name | Type | Default |
|---|---|---|
framebuffer | Rid | — |
drawFlags | RenderingDevice.DrawFlags | — |
clearColorValues | ReadOnlySpan<Color> | — |
clearDepthValue | float | — |
clearStencilValue | uint | — |
region | Rect2? | — |
breadcrumb | uint | — |
regionIf the parameter is null, then the default value is new Rect2(new Vector2(0.0f, 0.0f), new Vector2(0.0f, 0.0f)).
longpublic 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.
rd.draw_list_begin(fb[i], RenderingDevice.CLEAR_COLOR_ALL, clear_colors, true, 1.0f, true, 0, Rect2(), RenderingDevice.OPAQUE_PASS | 5)| Name | Type | Default |
|---|---|---|
framebuffer | Rid | — |
initialColorAction | RenderingDevice.InitialAction | — |
finalColorAction | RenderingDevice.FinalAction | — |
initialDepthAction | RenderingDevice.InitialAction | — |
finalDepthAction | RenderingDevice.FinalAction | — |
clearColorValues | Color[] | — |
clearDepth | float | — |
clearStencil | uint | — |
region | Rect2? | — |
clearColorValuesIf the parameter is null, then the default value is Array.Empty<Color>().
regionIf the parameter is null, then the default value is new Rect2(new Vector2(0.0f, 0.0f), new Vector2(0.0f, 0.0f)).
longpublic 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.
rd.draw_list_begin(fb[i], RenderingDevice.CLEAR_COLOR_ALL, clear_colors, true, 1.0f, true, 0, Rect2(), RenderingDevice.OPAQUE_PASS | 5)| Name | Type | Default |
|---|---|---|
framebuffer | Rid | — |
initialColorAction | RenderingDevice.InitialAction | — |
finalColorAction | RenderingDevice.FinalAction | — |
initialDepthAction | RenderingDevice.InitialAction | — |
finalDepthAction | RenderingDevice.FinalAction | — |
clearColorValues | Color[] | — |
clearDepth | float | — |
clearStencil | uint | — |
region | Rect2? | — |
storageTextures | Reckfell.Collections.Array | — |
longpublic 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.
rd.draw_list_begin(fb[i], RenderingDevice.CLEAR_COLOR_ALL, clear_colors, true, 1.0f, true, 0, Rect2(), RenderingDevice.OPAQUE_PASS | 5)| Name | Type | Default |
|---|---|---|
framebuffer | Rid | — |
initialColorAction | RenderingDevice.InitialAction | — |
finalColorAction | RenderingDevice.FinalAction | — |
initialDepthAction | RenderingDevice.InitialAction | — |
finalDepthAction | RenderingDevice.FinalAction | — |
clearColorValues | Color[] | — |
clearDepth | float | — |
clearStencil | uint | — |
region | Rect2? | — |
storageTextures | Reckfell.Collections.Array<Rid> | — |
clearColorValuesIf the parameter is null, then the default value is Array.Empty<Color>().
regionIf the parameter is null, then the default value is new Rect2(new Vector2(0.0f, 0.0f), new Vector2(0.0f, 0.0f)).
longpublic 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.
rd.draw_list_begin(fb[i], RenderingDevice.CLEAR_COLOR_ALL, clear_colors, true, 1.0f, true, 0, Rect2(), RenderingDevice.OPAQUE_PASS | 5)| Name | Type | Default |
|---|---|---|
framebuffer | Rid | — |
initialColorAction | RenderingDevice.InitialAction | — |
finalColorAction | RenderingDevice.FinalAction | — |
initialDepthAction | RenderingDevice.InitialAction | — |
finalDepthAction | RenderingDevice.FinalAction | — |
clearColorValues | Color[] | — |
clearDepth | float | — |
clearStencil | uint | — |
region | Rect2? | — |
breadcrumb | uint | — |
clearColorValuesIf the parameter is null, then the default value is Array.Empty<Color>().
regionIf the parameter is null, then the default value is new Rect2(new Vector2(0.0f, 0.0f), new Vector2(0.0f, 0.0f)).
longpublic 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.
rd.draw_list_begin(fb[i], RenderingDevice.CLEAR_COLOR_ALL, clear_colors, true, 1.0f, true, 0, Rect2(), RenderingDevice.OPAQUE_PASS | 5)| Name | Type | Default |
|---|---|---|
framebuffer | Rid | — |
initialColorAction | RenderingDevice.InitialAction | — |
finalColorAction | RenderingDevice.FinalAction | — |
initialDepthAction | RenderingDevice.InitialAction | — |
finalDepthAction | RenderingDevice.FinalAction | — |
clearColorValues | ReadOnlySpan<Color> | — |
clearDepth | float | — |
clearStencil | uint | — |
region | Rect2? | — |
regionIf the parameter is null, then the default value is new Rect2(new Vector2(0.0f, 0.0f), new Vector2(0.0f, 0.0f)).
longpublic 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.
rd.draw_list_begin(fb[i], RenderingDevice.CLEAR_COLOR_ALL, clear_colors, true, 1.0f, true, 0, Rect2(), RenderingDevice.OPAQUE_PASS | 5)| Name | Type | Default |
|---|---|---|
framebuffer | Rid | — |
initialColorAction | RenderingDevice.InitialAction | — |
finalColorAction | RenderingDevice.FinalAction | — |
initialDepthAction | RenderingDevice.InitialAction | — |
finalDepthAction | RenderingDevice.FinalAction | — |
clearColorValues | ReadOnlySpan<Color> | — |
clearDepth | float | — |
clearStencil | uint | — |
region | Rect2? | — |
storageTextures | Reckfell.Collections.Array<Rid> | — |
regionIf the parameter is null, then the default value is new Rect2(new Vector2(0.0f, 0.0f), new Vector2(0.0f, 0.0f)).
longpublic 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.
rd.draw_list_begin(fb[i], RenderingDevice.CLEAR_COLOR_ALL, clear_colors, true, 1.0f, true, 0, Rect2(), RenderingDevice.OPAQUE_PASS | 5)| Name | Type | Default |
|---|---|---|
framebuffer | Rid | — |
initialColorAction | RenderingDevice.InitialAction | — |
finalColorAction | RenderingDevice.FinalAction | — |
initialDepthAction | RenderingDevice.InitialAction | — |
finalDepthAction | RenderingDevice.FinalAction | — |
clearColorValues | ReadOnlySpan<Color> | — |
clearDepth | float | — |
clearStencil | uint | — |
region | Rect2? | — |
breadcrumb | uint | — |
regionIf the parameter is null, then the default value is new Rect2(new Vector2(0.0f, 0.0f), new Vector2(0.0f, 0.0f)).
longDrawListBeginForScreenlong
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.
| Name | Type | Default |
|---|---|---|
screen | int | 0 |
clearColor | Color? | default |
clearColorIf the parameter is null, then the default value is new Color(0.0f, 0.0f, 0.0f, 1.0f).
longDrawListBeginSplit2 overloads · Includes deprecated
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[].
| Name | Type | Default |
|---|---|---|
framebuffer | Rid | — |
splits | uint | — |
initialColorAction | RenderingDevice.InitialAction | — |
finalColorAction | RenderingDevice.FinalAction | — |
initialDepthAction | RenderingDevice.InitialAction | — |
finalDepthAction | RenderingDevice.FinalAction | — |
clearColorValues | Color[] | null |
clearDepth | float | 1f |
clearStencil | uint | 0 |
region | Rect2? | default |
storageTextures | Reckfell.Collections.Array<Rid> | null |
clearColorValuesIf the parameter is null, then the default value is Array.Empty<Color>().
regionIf the parameter is null, then the default value is new Rect2(new Vector2(0.0f, 0.0f), new Vector2(0.0f, 0.0f)).
long[]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[].
| Name | Type | Default |
|---|---|---|
framebuffer | Rid | — |
splits | uint | — |
initialColorAction | RenderingDevice.InitialAction | — |
finalColorAction | RenderingDevice.FinalAction | — |
initialDepthAction | RenderingDevice.InitialAction | — |
finalDepthAction | RenderingDevice.FinalAction | — |
clearColorValues | ReadOnlySpan<Color> | — |
clearDepth | float | — |
clearStencil | uint | — |
region | Rect2? | — |
storageTextures | Reckfell.Collections.Array<Rid> | — |
regionIf the parameter is null, then the default value is new Rect2(new Vector2(0.0f, 0.0f), new Vector2(0.0f, 0.0f)).
long[]DrawListBindIndexArrayvoid
public void DrawListBindIndexArray(long drawList, Rid indexArray);Binds index_array to the specified draw_list.
| Name | Type | Default |
|---|---|---|
drawList | long | — |
indexArray | Rid | — |
DrawListBindRenderPipelinevoid
public void DrawListBindRenderPipeline(long drawList, Rid renderPipeline);Binds render_pipeline to the specified draw_list.
| Name | Type | Default |
|---|---|---|
drawList | long | — |
renderPipeline | Rid | — |
DrawListBindUniformSetvoid
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.
| Name | Type | Default |
|---|---|---|
drawList | long | — |
uniformSet | Rid | — |
setIndex | uint | — |
DrawListBindVertexArrayvoid
public void DrawListBindVertexArray(long drawList, Rid vertexArray);Binds vertex_array to the specified draw_list.
| Name | Type | Default |
|---|---|---|
drawList | long | — |
vertexArray | Rid | — |
DrawListBindVertexBuffersFormat2 overloads
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.
| Name | Type | Default |
|---|---|---|
drawList | long | — |
vertexFormat | long | — |
vertexCount | uint | — |
vertexBuffers | Reckfell.Collections.Array<Rid> | — |
offsets | long[] | null |
offsetsIf the parameter is null, then the default value is Array.Empty<long>().
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.
| Name | Type | Default |
|---|---|---|
drawList | long | — |
vertexFormat | long | — |
vertexCount | uint | — |
vertexBuffers | Reckfell.Collections.Array<Rid> | — |
offsets | ReadOnlySpan<long> | — |
DrawListDisableScissorvoid
public void DrawListDisableScissor(long drawList);Removes and disables the scissor rectangle for the specified draw_list. See also RenderingDevice.DrawListEnableScissor.
| Name | Type | Default |
|---|---|---|
drawList | long | — |
DrawListDrawvoid
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.
| Name | Type | Default |
|---|---|---|
drawList | long | — |
useIndices | bool | — |
instances | uint | — |
proceduralVertexCount | uint | 0 |
DrawListDrawIndirectvoid
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.
| Name | Type | Default |
|---|---|---|
drawList | long | — |
useIndices | bool | — |
buffer | Rid | — |
offset | uint | 0 |
drawCount | uint | 1 |
stride | uint | 0 |
DrawListEnableScissorvoid
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.
| Name | Type | Default |
|---|---|---|
drawList | long | — |
rect | Rect2? | default |
rectIf 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
public void DrawListEnd();Finishes a list of raster drawing commands created with the draw_* methods.
public void DrawListEnd(RenderingDevice.BarrierMask postBarrier);Finishes a list of raster drawing commands created with the draw_* methods.
| Name | Type | Default |
|---|---|---|
postBarrier | RenderingDevice.BarrierMask | — |
DrawListSetBlendConstantsvoid
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.
| Name | Type | Default |
|---|---|---|
drawList | long | — |
color | Color | — |
DrawListSetPushConstant2 overloads
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).
| Name | Type | Default |
|---|---|---|
drawList | long | — |
buffer | byte[] | — |
sizeBytes | uint | — |
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).
| Name | Type | Default |
|---|---|---|
drawList | long | — |
buffer | ReadOnlySpan<byte> | — |
sizeBytes | uint | — |
DrawListSwitchToNextPasslong
public long DrawListSwitchToNextPass();Switches to the next draw pass.
longDrawListSwitchToNextPassSplitlong[] · Deprecated
public long[] DrawListSwitchToNextPassSplit(uint splits);This method does nothing and always returns an empty long[].
| Name | Type | Default |
|---|---|---|
splits | uint | — |
long[]FramebufferCreateRid
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.
| Name | Type | Default |
|---|---|---|
textures | Reckfell.Collections.Array<Rid> | — |
validateWithFormat | long | -1 |
viewCount | uint | 1 |
RidFramebufferCreateEmptyRid
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.
| Name | Type | Default |
|---|---|---|
size | Vector2I | — |
samples | RenderingDevice.TextureSamples | RenderingDevice.TextureSamples.Samples1 |
validateWithFormat | long | -1 |
RidFramebufferCreateMultipassRid
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.
| Name | Type | Default |
|---|---|---|
textures | Reckfell.Collections.Array<Rid> | — |
passes | Reckfell.Collections.Array<RDFramebufferPass> | — |
validateWithFormat | long | -1 |
viewCount | uint | 1 |
RidFramebufferFormatCreatelong
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.
| Name | Type | Default |
|---|---|---|
attachments | Reckfell.Collections.Array<RDAttachmentFormat> | — |
viewCount | uint | 1 |
longFramebufferFormatCreateEmptylong
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.
| Name | Type | Default |
|---|---|---|
samples | RenderingDevice.TextureSamples | RenderingDevice.TextureSamples.Samples1 |
longFramebufferFormatCreateMultipasslong
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.
| Name | Type | Default |
|---|---|---|
attachments | Reckfell.Collections.Array<RDAttachmentFormat> | — |
passes | Reckfell.Collections.Array<RDFramebufferPass> | — |
viewCount | uint | 1 |
longFramebufferFormatGetTextureSamplesRenderingDevice.TextureSamples
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).
| Name | Type | Default |
|---|---|---|
format | long | — |
renderPass | uint | 0 |
RenderingDevice.TextureSamplesFramebufferGetFormatlong
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.
| Name | Type | Default |
|---|---|---|
framebuffer | Rid | — |
longFramebufferIsValidbool
public bool FramebufferIsValid(Rid framebuffer);Returns true if the framebuffer specified by the framebuffer RID is valid, false otherwise.
| Name | Type | Default |
|---|---|---|
framebuffer | Rid | — |
boolFreeRidvoid
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.
| Name | Type | Default |
|---|---|---|
rid | Rid | — |
ridLive resource RID owned by this device.
FullBarriervoid · Deprecated
public void FullBarrier();This method does nothing.
GetCapturedTimestampCpuTimeulong
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.
| Name | Type | Default |
|---|---|---|
index | uint | — |
ulongGetCapturedTimestampGpuTimeulong
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.
| Name | Type | Default |
|---|---|---|
index | uint | — |
ulongGetCapturedTimestampNamestring
public string GetCapturedTimestampName(uint index);Returns the timestamp's name for the rendering step specified by index. See also RenderingDevice.CaptureTimestamp.
| Name | Type | Default |
|---|---|---|
index | uint | — |
stringGetCapturedTimestampsCountuint
public uint GetCapturedTimestampsCount();Returns the total number of timestamps (rendering steps) available for profiling.
uintGetCapturedTimestampsFrameulong
public ulong GetCapturedTimestampsFrame();Returns the index of the last frame rendered that has rendering timestamps available for querying.
ulongGetDeviceAllocationCountulong
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.
ulongGetDeviceAllocsByObjectTypeulong
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.
| Name | Type | Default |
|---|---|---|
type | uint | — |
ulongGetDeviceMemoryByObjectTypeulong
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.
| Name | Type | Default |
|---|---|---|
type | uint | — |
ulongGetDeviceNamestring
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.
stringGetDevicePipelineCacheUuidstring
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.
stringGetDeviceTotalMemoryulong
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.
ulongGetDeviceVendorNamestring
public string GetDeviceVendorName();Returns the vendor of the video adapter (e.g. "NVIDIA Corporation"). Equivalent to RenderingServer.GetVideoAdapterVendor. See also RenderingDevice.GetDeviceName.
stringGetDriverAllocationCountulong
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.
ulongGetDriverAllocsByObjectTypeulong
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.
| Name | Type | Default |
|---|---|---|
type | uint | — |
ulongGetDriverAndDeviceMemoryReportstring
public string GetDriverAndDeviceMemoryReport();Returns string report in CSV format using the following methods:
RenderingDevice.GetTrackedObjectNameRenderingDevice.GetTrackedObjectTypeCountRenderingDevice.GetDriverTotalMemoryRenderingDevice.GetDriverAllocationCountRenderingDevice.GetDriverMemoryByObjectTypeRenderingDevice.GetDriverAllocsByObjectTypeRenderingDevice.GetDeviceTotalMemoryRenderingDevice.GetDeviceAllocationCountRenderingDevice.GetDeviceMemoryByObjectTypeRenderingDevice.GetDeviceAllocsByObjectTypeThis is only used by Vulkan in debug builds. Reckfell must also be started with the--extra-gpu-memory-trackingcommand line argument.
stringGetDriverMemoryByObjectTypeulong
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.
| Name | Type | Default |
|---|---|---|
type | uint | — |
ulongGetDriverResourceulong
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.
| Name | Type | Default |
|---|---|---|
resource | RenderingDevice.DriverResource | — |
rid | Rid | — |
index | ulong | — |
ulongGetDriverTotalMemoryulong
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.
ulongGetFrameDelayuint
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.
uintGetMemoryUsageulong
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.
| Name | Type | Default |
|---|---|---|
type | RenderingDevice.MemoryType | — |
ulongGetPerfReportstring
public string GetPerfReport();Returns a string with a performance report from the past frame. Updates every frame.
stringGetTrackedObjectNamestring
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", thenget_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-trackingcommand line argument.
| Name | Type | Default |
|---|---|---|
typeIndex | uint | — |
stringGetTrackedObjectTypeCountulong
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.
ulongHasFeaturebool
public bool HasFeature(RenderingDevice.Features feature);Returns true if the feature is supported by the GPU.
| Name | Type | Default |
|---|---|---|
feature | RenderingDevice.Features | — |
boolHitSbtCreateRid
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.
| Name | Type | Default |
|---|---|---|
raytracingPipeline | Rid | — |
initialHitGroupCapacity | uint | — |
RidHitSbtRangeAlloclong
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_countmust be large enough to cover all SBT entries that may be indexed by this equation. This typically corresponds to: (geometry count inRDAccelerationStructureInstance.Blas) × (SBT stride used intraceRayEXT) The allocated range is uninitialized and must be filled usingRenderingDevice.HitSbtRangeUpdate.
| Name | Type | Default |
|---|---|---|
hitSbt | Rid | — |
hitGroupCount | uint | — |
longHitSbtRangeFreeError
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.
| Name | Type | Default |
|---|---|---|
hitSbt | Rid | — |
range | long | — |
ErrorHitSbtRangeUpdate2 overloads
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.
| Name | Type | Default |
|---|---|---|
hitSbt | Rid | — |
range | long | — |
offset | uint | — |
hitGroupIndices | int[] | — |
Errorpublic 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.
| Name | Type | Default |
|---|---|---|
hitSbt | Rid | — |
range | long | — |
offset | uint | — |
hitGroupIndices | ReadOnlySpan<int> | — |
ErrorHitSbtSetPipelineError
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.
| Name | Type | Default |
|---|---|---|
hitSbt | Rid | — |
raytracingPipeline | Rid | — |
ErrorIndexArrayCreateRid
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.
| Name | Type | Default |
|---|---|---|
indexBuffer | Rid | — |
indexOffset | uint | — |
indexCount | uint | — |
RidIndexBufferCreate4 overloads
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.
| Name | Type | Default |
|---|---|---|
sizeIndices | uint | — |
format | RenderingDevice.IndexBufferFormat | — |
data | byte[] | — |
useRestartIndices | bool | — |
dataIf the parameter is null, then the default value is Array.Empty<byte>().
Ridpublic 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.
| Name | Type | Default |
|---|---|---|
sizeIndices | uint | — |
format | RenderingDevice.IndexBufferFormat | — |
data | byte[] | null |
useRestartIndices | bool | false |
creationBits | RenderingDevice.BufferCreationBits | (RenderingDevice.BufferCreationBits)0 |
dataIf the parameter is null, then the default value is Array.Empty<byte>().
Ridpublic 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.
| Name | Type | Default |
|---|---|---|
sizeIndices | uint | — |
format | RenderingDevice.IndexBufferFormat | — |
data | ReadOnlySpan<byte> | — |
useRestartIndices | bool | — |
Ridpublic 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.
| Name | Type | Default |
|---|---|---|
sizeIndices | uint | — |
format | RenderingDevice.IndexBufferFormat | — |
data | ReadOnlySpan<byte> | — |
useRestartIndices | bool | — |
creationBits | RenderingDevice.BufferCreationBits | — |
RidLimitGetulong
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.
| Name | Type | Default |
|---|---|---|
limit | RenderingDevice.Limit | — |
limitSpecific RenderingDevice.Limit entry. Select the corresponding limit for 2D, 3D, cube textures, layers or other resources.
ulongNumeric value of the selected device limit. Units depend on the enum entry; MaxTextureSize2D is the maximum side length in pixels.
RaytracingListBeginlong
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):
longRaytracingListBindRaytracingPipelinevoid
public void RaytracingListBindRaytracingPipeline(long raytracingList, Rid raytracingPipeline);Binds raytracing_pipeline to the specified raytracing_list.
| Name | Type | Default |
|---|---|---|
raytracingList | long | — |
raytracingPipeline | Rid | — |
RaytracingListBindUniformSetvoid
public void RaytracingListBindUniformSet(long raytracingList, Rid uniformSet, uint setIndex);Binds the uniform_set to this raytracing_list.
| Name | Type | Default |
|---|---|---|
raytracingList | long | — |
uniformSet | Rid | — |
setIndex | uint | — |
RaytracingListEndvoid
public void RaytracingListEnd();Finishes a list of raytracing commands created with the raytracing_* methods.
RaytracingListSetPushConstant2 overloads
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).
| Name | Type | Default |
|---|---|---|
raytracingList | long | — |
buffer | byte[] | — |
sizeBytes | uint | — |
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).
| Name | Type | Default |
|---|---|---|
raytracingList | long | — |
buffer | ReadOnlySpan<byte> | — |
sizeBytes | uint | — |
RaytracingListTraceRaysvoid
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.
| Name | Type | Default |
|---|---|---|
raytracingList | long | — |
raygenShaderIndex | uint | — |
hitSbt | Rid | — |
width | uint | — |
height | uint | — |
depth | uint | — |
RaytracingPipelineCreateRid
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:
raygen_shadersis indexed inRenderingDevice.RaytracingListTraceRays.miss_shadersis indexed intraceRayEXT.hit_groupsis indexed inRenderingDevice.HitSbtRangeUpdate.
| Name | Type | Default |
|---|---|---|
raygenShaders | Reckfell.Collections.Array<RDPipelineShader> | — |
missShaders | Reckfell.Collections.Array<RDPipelineShader> | — |
hitGroups | Reckfell.Collections.Array<RDHitGroup> | — |
maxTraceRecursionDepth | uint | — |
RidRaytracingPipelineIsValidbool
public bool RaytracingPipelineIsValid(Rid raytracingPipeline);Returns true if the raytracing pipeline specified by the raytracing_pipeline RID is valid, false otherwise.
| Name | Type | Default |
|---|---|---|
raytracingPipeline | Rid | — |
boolRenderPipelineCreateRid
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.
| Name | Type | Default |
|---|---|---|
shader | Rid | — |
framebufferFormat | long | — |
vertexFormat | long | — |
primitive | RenderingDevice.RenderPrimitive | — |
rasterizationState | RDPipelineRasterizationState | — |
multisampleState | RDPipelineMultisampleState | — |
stencilState | RDPipelineDepthStencilState | — |
colorBlendState | RDPipelineColorBlendState | — |
dynamicStateFlags | RenderingDevice.PipelineDynamicStateFlags | (RenderingDevice.PipelineDynamicStateFlags)0 |
forRenderPass | uint | 0 |
specializationConstants | Reckfell.Collections.Array<RDPipelineSpecializationConstant> | null |
RidRenderPipelineIsValidbool
public bool RenderPipelineIsValid(Rid renderPipeline);Returns true if the render pipeline specified by the render_pipeline RID is valid, false otherwise.
| Name | Type | Default |
|---|---|---|
renderPipeline | Rid | — |
boolSamplerCreateRid
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.
| Name | Type | Default |
|---|---|---|
state | RDSamplerState | — |
RidSamplerIsFormatSupportedForFilterbool
public bool SamplerIsFormatSupportedForFilter(RenderingDevice.DataFormat format, RenderingDevice.SamplerFilter samplerFilter);Returns true if implementation supports using a texture of format with the given sampler_filter.
| Name | Type | Default |
|---|---|---|
format | RenderingDevice.DataFormat | — |
samplerFilter | RenderingDevice.SamplerFilter | — |
boolScreenGetFramebufferFormat2 overloads
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.
longpublic 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.
| Name | Type | Default |
|---|---|---|
screen | int | 0 |
longScreenGetHeightint
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.
| Name | Type | Default |
|---|---|---|
screen | int | 0 |
intScreenGetWidthint
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.
| Name | Type | Default |
|---|---|---|
screen | int | 0 |
intSetResourceNamevoid
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.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
name | string | — |
ShaderCompileBinaryFromSpirVbyte[]
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.
| Name | Type | Default |
|---|---|---|
spirVData | RDShaderSpirV | — |
name | string | "" |
byte[]ShaderCompileSpirVFromSourceRDShaderSpirV
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.
| Name | Type | Default |
|---|---|---|
shaderSource | RDShaderSource | — |
allowCache | bool | true |
shaderSourceStage sources with the chosen language. SourceCompute takes raw GLSL.
allowCacheAllow the compilation cache. Result errors must still be inspected.
RDShaderSpirVBytecode object containing per-stage data and errors.
ShaderCreateFromBytecode4 overloads
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.
| Name | Type | Default |
|---|---|---|
binaryData | byte[] | — |
Ridpublic 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.
| Name | Type | Default |
|---|---|---|
binaryData | byte[] | — |
placeholderRid | Rid | default |
Ridpublic 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.
| Name | Type | Default |
|---|---|---|
binaryData | ReadOnlySpan<byte> | — |
Ridpublic 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.
| Name | Type | Default |
|---|---|---|
binaryData | ReadOnlySpan<byte> | — |
placeholderRid | Rid | — |
RidShaderCreateFromSpirVRid
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.
| Name | Type | Default |
|---|---|---|
spirVData | RDShaderSpirV | — |
name | string | "" |
spirVDataStage bytecode without compilation errors.
nameOptional shader diagnostic name.
RidRID of the created device-owned resource; check validity.
ShaderCreatePlaceholderRid
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.
RidShaderGetVertexInputAttributeMaskulong
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).
| Name | Type | Default |
|---|---|---|
shader | Rid | — |
ulongStorageBufferCreate4 overloads
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.
| Name | Type | Default |
|---|---|---|
sizeBytes | uint | — |
data | byte[] | — |
usage | RenderingDevice.StorageBufferUsage | — |
dataIf the parameter is null, then the default value is Array.Empty<byte>().
Ridpublic 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.
| Name | Type | Default |
|---|---|---|
sizeBytes | uint | — |
data | byte[] | null |
usage | RenderingDevice.StorageBufferUsage | (RenderingDevice.StorageBufferUsage)0 |
creationBits | RenderingDevice.BufferCreationBits | (RenderingDevice.BufferCreationBits)0 |
sizeBytesTotal buffer size in bytes; nonempty data must have the same length.
dataSource bytes, not elements of an arbitrary width.
usageStorage-buffer usage flags; 0 for the basic example.
creationBitsAdditional buffer creation flags; 0 for the basic example.
RidRID of the created device-owned resource; check validity.
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.
| Name | Type | Default |
|---|---|---|
sizeBytes | uint | — |
data | ReadOnlySpan<byte> | — |
usage | RenderingDevice.StorageBufferUsage | — |
Ridpublic 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.
| Name | Type | Default |
|---|---|---|
sizeBytes | uint | — |
data | ReadOnlySpan<byte> | — |
usage | RenderingDevice.StorageBufferUsage | — |
creationBits | RenderingDevice.BufferCreationBits | — |
RidSubmitvoid
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
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
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.
| Name | Type | Default |
|---|---|---|
sizeBytes | uint | — |
format | RenderingDevice.DataFormat | — |
data | byte[] | null |
dataIf the parameter is null, then the default value is Array.Empty<byte>().
Ridpublic 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.
| Name | Type | Default |
|---|---|---|
sizeBytes | uint | — |
format | RenderingDevice.DataFormat | — |
data | ReadOnlySpan<byte> | — |
RidTextureClear2 overloads
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.
| Name | Type | Default |
|---|---|---|
texture | Rid | — |
color | Color | — |
baseMipmap | uint | — |
mipmapCount | uint | — |
baseLayer | uint | — |
layerCount | uint | — |
Errorpublic 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.
| Name | Type | Default |
|---|---|---|
texture | Rid | — |
color | Color | — |
baseMipmap | uint | — |
mipmapCount | uint | — |
baseLayer | uint | — |
layerCount | uint | — |
postBarrier | RenderingDevice.BarrierMask | — |
ErrorTextureCopy2 overloads
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).
| Name | Type | Default |
|---|---|---|
fromTexture | Rid | — |
toTexture | Rid | — |
fromPos | Vector3 | — |
toPos | Vector3 | — |
size | Vector3 | — |
srcMipmap | uint | — |
dstMipmap | uint | — |
srcLayer | uint | — |
dstLayer | uint | — |
Errorpublic 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).
| Name | Type | Default |
|---|---|---|
fromTexture | Rid | — |
toTexture | Rid | — |
fromPos | Vector3 | — |
toPos | Vector3 | — |
size | Vector3 | — |
srcMipmap | uint | — |
dstMipmap | uint | — |
srcLayer | uint | — |
dstLayer | uint | — |
postBarrier | RenderingDevice.BarrierMask | — |
ErrorTextureCreateRid
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.
| Name | Type | Default |
|---|---|---|
format | RDTextureFormat | — |
view | RDTextureView | — |
data | Reckfell.Collections.Array<byte[]> | null |
RidTextureCreateFromExtension2 overloads
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.
| Name | Type | Default |
|---|---|---|
type | RenderingDevice.TextureType | — |
format | RenderingDevice.DataFormat | — |
samples | RenderingDevice.TextureSamples | — |
usageFlags | RenderingDevice.TextureUsageBits | — |
image | ulong | — |
width | ulong | — |
height | ulong | — |
depth | ulong | — |
layers | ulong | — |
Ridpublic 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.
| Name | Type | Default |
|---|---|---|
type | RenderingDevice.TextureType | — |
format | RenderingDevice.DataFormat | — |
samples | RenderingDevice.TextureSamples | — |
usageFlags | RenderingDevice.TextureUsageBits | — |
image | ulong | — |
width | ulong | — |
height | ulong | — |
depth | ulong | — |
layers | ulong | — |
mipmaps | ulong | 1 |
RidTextureCreateSharedRid
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.
| Name | Type | Default |
|---|---|---|
view | RDTextureView | — |
withTexture | Rid | — |
RidTextureCreateSharedFromSlice2 overloads
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.
| Name | Type | Default |
|---|---|---|
view | RDTextureView | — |
withTexture | Rid | — |
layer | uint | — |
mipmap | uint | — |
mipmaps | uint | — |
sliceType | RenderingDevice.TextureSliceType | — |
RidTextureGetDatabyte[]
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.
| Name | Type | Default |
|---|---|---|
texture | Rid | — |
layer | uint | — |
byte[]TextureGetDataAsyncError
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.
| Name | Type | Default |
|---|---|---|
texture | Rid | — |
layer | uint | — |
callback | Callable | — |
ErrorTextureGetFormatRDTextureFormat
public RDTextureFormat TextureGetFormat(Rid texture);Returns the data format used to create this texture.
| Name | Type | Default |
|---|---|---|
texture | Rid | — |
RDTextureFormatTextureGetNativeHandleulong · Deprecated
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).
| Name | Type | Default |
|---|---|---|
texture | Rid | — |
ulongTextureIsDiscardablebool
public bool TextureIsDiscardable(Rid texture);Returns true if the texture is discardable, false otherwise. See RDTextureFormat or RenderingDevice.TextureSetDiscardable.
| Name | Type | Default |
|---|---|---|
texture | Rid | — |
boolTextureIsFormatSupportedForUsagebool
public bool TextureIsFormatSupportedForUsage(RenderingDevice.DataFormat format, RenderingDevice.TextureUsageBits usageFlags);Returns true if the specified format is supported for the given usage_flags, false otherwise.
| Name | Type | Default |
|---|---|---|
format | RenderingDevice.DataFormat | — |
usageFlags | RenderingDevice.TextureUsageBits | — |
boolTextureIsSharedbool
public bool TextureIsShared(Rid texture);Returns true if the texture is shared, false otherwise. See RDTextureView.
| Name | Type | Default |
|---|---|---|
texture | Rid | — |
boolTextureIsValidbool
public bool TextureIsValid(Rid texture);Returns true if the texture is valid, false otherwise.
| Name | Type | Default |
|---|---|---|
texture | Rid | — |
boolTextureResolveMultisample2 overloads
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).
| Name | Type | Default |
|---|---|---|
fromTexture | Rid | — |
toTexture | Rid | — |
Errorpublic 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).
| Name | Type | Default |
|---|---|---|
fromTexture | Rid | — |
toTexture | Rid | — |
postBarrier | RenderingDevice.BarrierMask | — |
ErrorTextureSetDiscardablevoid
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.
| Name | Type | Default |
|---|---|---|
texture | Rid | — |
discardable | bool | — |
TextureUpdate4 overloads
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.
| Name | Type | Default |
|---|---|---|
texture | Rid | — |
layer | uint | — |
data | byte[] | — |
Errorpublic 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.
| Name | Type | Default |
|---|---|---|
texture | Rid | — |
layer | uint | — |
data | byte[] | — |
postBarrier | RenderingDevice.BarrierMask | — |
Errorpublic 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.
| Name | Type | Default |
|---|---|---|
texture | Rid | — |
layer | uint | — |
data | ReadOnlySpan<byte> | — |
Errorpublic 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.
| Name | Type | Default |
|---|---|---|
texture | Rid | — |
layer | uint | — |
data | ReadOnlySpan<byte> | — |
postBarrier | RenderingDevice.BarrierMask | — |
ErrorTlasBuildError
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.
| Name | Type | Default |
|---|---|---|
tlas | Rid | — |
instances | Reckfell.Collections.Array<RDAccelerationStructureInstance> | — |
ErrorTlasCreateRid
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.
| Name | Type | Default |
|---|---|---|
maxInstanceCount | uint | — |
flags | RenderingDevice.AccelerationStructureFlagBits | — |
RidUniformBufferCreate4 overloads
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.
| Name | Type | Default |
|---|---|---|
sizeBytes | uint | — |
data | byte[] | — |
dataIf the parameter is null, then the default value is Array.Empty<byte>().
Ridpublic 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.
| Name | Type | Default |
|---|---|---|
sizeBytes | uint | — |
data | byte[] | null |
creationBits | RenderingDevice.BufferCreationBits | (RenderingDevice.BufferCreationBits)0 |
dataIf the parameter is null, then the default value is Array.Empty<byte>().
Ridpublic 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.
| Name | Type | Default |
|---|---|---|
sizeBytes | uint | — |
data | ReadOnlySpan<byte> | — |
Ridpublic 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.
| Name | Type | Default |
|---|---|---|
sizeBytes | uint | — |
data | ReadOnlySpan<byte> | — |
creationBits | RenderingDevice.BufferCreationBits | — |
RidUniformSetCreateRid
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.
| Name | Type | Default |
|---|---|---|
uniforms | Reckfell.Collections.Array<RDUniform> | — |
shader | Rid | — |
shaderSet | uint | — |
uniformsDescriptions covering all required bindings in the selected set.
shaderSame-device shader RID with the corresponding layout.
shaderSetGLSL set index declared by the shader, not a binding number.
RidRID of the created device-owned resource; check validity.
UniformSetIsValidbool
public bool UniformSetIsValid(Rid uniformSet);Checks if the uniform_set is valid, i.e. is owned.
| Name | Type | Default |
|---|---|---|
uniformSet | Rid | — |
boolVertexArrayCreate2 overloads
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.
| Name | Type | Default |
|---|---|---|
vertexCount | uint | — |
vertexFormat | long | — |
srcBuffers | Reckfell.Collections.Array<Rid> | — |
offsets | long[] | null |
offsetsIf the parameter is null, then the default value is Array.Empty<long>().
Ridpublic 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.
| Name | Type | Default |
|---|---|---|
vertexCount | uint | — |
vertexFormat | long | — |
srcBuffers | Reckfell.Collections.Array<Rid> | — |
offsets | ReadOnlySpan<long> | — |
RidVertexBufferCreate4 overloads
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.
| Name | Type | Default |
|---|---|---|
sizeBytes | uint | — |
data | byte[] | null |
creationBits | RenderingDevice.BufferCreationBits | (RenderingDevice.BufferCreationBits)0 |
dataIf the parameter is null, then the default value is Array.Empty<byte>().
Ridpublic 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.
| Name | Type | Default |
|---|---|---|
sizeBytes | uint | — |
data | byte[] | — |
useAsStorage | bool | — |
dataIf the parameter is null, then the default value is Array.Empty<byte>().
Ridpublic 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.
| Name | Type | Default |
|---|---|---|
sizeBytes | uint | — |
data | ReadOnlySpan<byte> | — |
creationBits | RenderingDevice.BufferCreationBits | — |
Ridpublic 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.
| Name | Type | Default |
|---|---|---|
sizeBytes | uint | — |
data | ReadOnlySpan<byte> | — |
useAsStorage | bool | — |
RidVertexFormatCreatelong
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.
| Name | Type | Default |
|---|---|---|
vertexDescriptions | Reckfell.Collections.Array<RDVertexAttribute> | — |
longFields and constants2
InvalidFormatIdField
public const long InvalidFormatId = -1;Returned by functions that return a format ID if a value is invalid.
InvalidIdField
public const long InvalidId = -1;Returned by functions that return an ID if a value is invalid.
RenderingDevice.AccelerationStructureFlagBits
| Value | Description |
|---|---|
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
| Value | Description |
|---|---|
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
| Value | Description |
|---|---|
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
| Value | Description |
|---|---|
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 |
Transfer = 4 | Transfer barrier mask. |
Vertex = 1 | Vertex shader barrier mask. |
RenderingDevice.BlendFactor
| Value | Description |
|---|---|
ConstantAlpha = 12 | Color and alpha blend factor is |
ConstantColor = 10 | Color blend factor is |
DstAlpha = 8 | Color and alpha blend factor is |
DstColor = 4 | Color blend factor is |
Max = 19 | Represents the size of the |
One = 1 | Constant |
OneMinusConstantAlpha = 13 | Color and alpha blend factor is |
OneMinusConstantColor = 11 | Color blend factor is |
OneMinusDstAlpha = 9 | Color and alpha blend factor is |
OneMinusDstColor = 5 | Color blend factor is |
OneMinusSrc1Alpha = 18 | Color and alpha blend factor is |
OneMinusSrc1Color = 16 | Color blend factor is |
OneMinusSrcAlpha = 7 | Color and alpha blend factor is |
OneMinusSrcColor = 3 | Color blend factor is |
Src1Alpha = 17 | Color and alpha blend factor is |
Src1Color = 15 | Color blend factor is |
SrcAlpha = 6 | Color and alpha blend factor is |
SrcAlphaSaturate = 14 | Color blend factor is |
SrcColor = 2 | Color blend factor is |
Zero = 0 | Constant |
RenderingDevice.BlendOperation
| Value | Description |
|---|---|
Add = 0 | Additive blending operation ( |
Max = 5 | Represents the size of the |
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 ( |
Subtract = 1 | Subtractive blending operation ( |
RenderingDevice.BreadcrumbMarker
| Value | Description |
|---|---|
AlphaPass = 458752 | During a GPU crash in dev or debug mode, Reckfell's error message will include |
BlitPass = 655360 | During a GPU crash in dev or debug mode, Reckfell's error message will include |
DebugPass = 786432 | During a GPU crash in dev or debug mode, Reckfell's error message will include |
LightmapperPass = 196608 | During a GPU crash in dev or debug mode, Reckfell's error message will include |
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 |
PostProcessingPass = 589824 | During a GPU crash in dev or debug mode, Reckfell's error message will include |
ReflectionProbes = 65536 | During a GPU crash in dev or debug mode, Reckfell's error message will include |
ShadowPassCube = 327680 | During a GPU crash in dev or debug mode, Reckfell's error message will include |
ShadowPassDirectional = 262144 | During a GPU crash in dev or debug mode, Reckfell's error message will include |
SkyPass = 131072 | During a GPU crash in dev or debug mode, Reckfell's error message will include |
TransparentPass = 524288 | During a GPU crash in dev or debug mode, Reckfell's error message will include |
UiPass = 720896 | During a GPU crash in dev or debug mode, Reckfell's error message will include |
RenderingDevice.BufferCreationBits
| Value | Description |
|---|---|
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.CompareOperator
| Value | Description |
|---|---|
Always = 7 | "Always" comparison (opposite of |
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 |
Never = 0 | "Never" comparison (opposite of |
NotEqual = 5 | "Not equal" comparison. |
RenderingDevice.DataFormat
| Value | Description |
|---|---|
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
A8B8G8R8SintPack32 = 55 | 8-bit-per-channel signed integer alpha/red/green/blue channel data format, packed in 32 bits. Values are in the |
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 |
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 |
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 |
A8B8G8R8UintPack32 = 54 | 8-bit-per-channel unsigned integer alpha/red/green/blue channel data format, packed in 32 bits. Values are in the |
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 |
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 |
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 |
Astc10X10UnormBlock = 178 | VRAM-compressed unsigned floating-point data format with normalized value, packed in 10×10 blocks. Values are in the |
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 |
Astc10X5UnormBlock = 172 | VRAM-compressed unsigned floating-point data format with normalized value, packed in 10×5 blocks. Values are in the |
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 |
Astc10X6UnormBlock = 174 | VRAM-compressed unsigned floating-point data format with normalized value, packed in 10×6 blocks. Values are in the |
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 |
Astc10X8UnormBlock = 176 | VRAM-compressed unsigned floating-point data format with normalized value, packed in 10×8 blocks. Values are in the |
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 |
Astc12X10UnormBlock = 180 | VRAM-compressed unsigned floating-point data format with normalized value, packed in 12×10 blocks. Values are in the |
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 |
Astc12X12UnormBlock = 182 | VRAM-compressed unsigned floating-point data format with normalized value, packed in 12 blocks (lowest quality). Values are in the |
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 |
Astc4X4UnormBlock = 156 | VRAM-compressed unsigned floating-point data format with normalized value, packed in 4×4 blocks (highest quality). Values are in the |
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 |
Astc5X4UnormBlock = 158 | VRAM-compressed unsigned floating-point data format with normalized value, packed in 5×4 blocks. Values are in the |
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 |
Astc5X5UnormBlock = 160 | VRAM-compressed unsigned floating-point data format with normalized value, packed in 5×5 blocks. Values are in the |
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 |
Astc6X5UnormBlock = 162 | VRAM-compressed unsigned floating-point data format with normalized value, packed in 6×5 blocks. Values are in the |
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 |
Astc6X6UnormBlock = 164 | VRAM-compressed unsigned floating-point data format with normalized value, packed in 6×6 blocks. Values are in the |
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 |
Astc8X5UnormBlock = 166 | VRAM-compressed unsigned floating-point data format with normalized value, packed in 8×5 blocks. Values are in the |
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 |
Astc8X6UnormBlock = 168 | VRAM-compressed unsigned floating-point data format with normalized value, packed in 8×6 blocks. Values are in the |
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 |
Astc8X8UnormBlock = 170 | VRAM-compressed unsigned floating-point data format with normalized value, packed in 8×8 blocks. Values are in the |
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 |
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 |
B16G16R16G16422Unorm = 212 | 16-bit-per-channel unsigned floating-point blue/green/red channel data format with normalized value. Values are in the |
B4G4R4A4UnormPack16 = 2 | 4-bit-per-channel blue/green/red/alpha channel data format, packed into 16 bits. Values are in the |
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 |
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 |
B8G8R8A8Sint = 48 | 8-bit-per-channel signed integer blue/green/red/alpha channel data format. Values are in the |
B8G8R8A8Snorm = 44 | 8-bit-per-channel signed floating-point blue/green/red/alpha channel data format with normalized value. Values are in the |
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 |
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 |
B8G8R8A8Uint = 47 | 8-bit-per-channel unsigned integer blue/green/red/alpha channel data format. Values are in the |
B8G8R8A8Unorm = 43 | 8-bit-per-channel unsigned floating-point blue/green/red/alpha channel data format with normalized value. Values are in the |
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 |
B8G8R8G8422Unorm = 185 | 8-bit-per-channel unsigned floating-point blue/green/red channel data format with normalized value. Values are in the |
B8G8R8Sint = 34 | 8-bit-per-channel signed integer blue/green/red channel data format. Values are in the |
B8G8R8Snorm = 30 | 8-bit-per-channel signed floating-point blue/green/red channel data format with normalized value. Values are in the |
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 |
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 |
B8G8R8Uint = 33 | 8-bit-per-channel unsigned integer blue/green/red channel data format. Values are in the |
B8G8R8Unorm = 29 | 8-bit-per-channel unsigned floating-point blue/green/red channel data format with normalized value. Values are in the |
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 |
Bc1RgbSrgbBlock = 131 | VRAM-compressed unsigned red/green/blue channel data format with normalized value and nonlinear sRGB encoding. Values are in the |
Bc1RgbUnormBlock = 130 | VRAM-compressed unsigned red/green/blue channel data format with normalized value. Values are in the |
Bc1RgbaSrgbBlock = 133 | VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and nonlinear sRGB encoding. Values are in the |
Bc1RgbaUnormBlock = 132 | VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the |
Bc2SrgbBlock = 135 | VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and nonlinear sRGB encoding. Values are in the |
Bc2UnormBlock = 134 | VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the |
Bc3SrgbBlock = 137 | VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and nonlinear sRGB encoding. Values are in the |
Bc3UnormBlock = 136 | VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the |
Bc4SnormBlock = 139 | VRAM-compressed signed red channel data format with normalized value. Values are in the |
Bc4UnormBlock = 138 | VRAM-compressed unsigned red channel data format with normalized value. Values are in the |
Bc5SnormBlock = 141 | VRAM-compressed signed red/green channel data format with normalized value. Values are in the |
Bc5UnormBlock = 140 | VRAM-compressed unsigned red/green channel data format with normalized value. Values are in the |
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 |
Bc7UnormBlock = 144 | VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the |
D16Unorm = 123 | 16-bit unsigned floating-point depth data format with normalized value. Values are in the |
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 |
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 |
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 |
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 |
EacR11G11UnormBlock = 154 | 11-bit VRAM-compressed unsigned red/green channel data format with normalized value. Values are in the |
EacR11SnormBlock = 153 | 11-bit VRAM-compressed signed red channel data format with normalized value. Values are in the |
EacR11UnormBlock = 152 | 11-bit VRAM-compressed unsigned red channel data format with normalized value. Values are in the |
Etc2R8G8B8A1SrgbBlock = 149 | VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and nonlinear sRGB encoding. Values are in the |
Etc2R8G8B8A1UnormBlock = 148 | VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the |
Etc2R8G8B8A8SrgbBlock = 151 | VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and nonlinear sRGB encoding. Values are in the |
Etc2R8G8B8A8UnormBlock = 150 | VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the |
Etc2R8G8B8SrgbBlock = 147 | VRAM-compressed unsigned red/green/blue channel data format with normalized value and nonlinear sRGB encoding. Values are in the |
Etc2R8G8B8UnormBlock = 146 | VRAM-compressed unsigned red/green/blue channel data format with normalized value. Values are in the |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
G16B16G16R16422Unorm = 211 | 16-bit-per-channel unsigned floating-point green/blue/red channel data format with normalized value. Values are in the |
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 |
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 |
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 |
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 |
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 |
G8B8G8R8422Unorm = 184 | 8-bit-per-channel unsigned floating-point green/blue/red channel data format with normalized value. Values are in the |
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 |
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 |
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 |
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 |
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 |
Max = 232 | Represents the size of the |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
R16G16B16A16Snorm = 91 | 16-bit-per-channel signed floating-point red/green/blue/alpha channel data format with normalized value. Values are in the |
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 |
R16G16B16A16Uint = 94 | 16-bit-per-channel unsigned integer red/green/blue/alpha channel data format. Values are in the |
R16G16B16A16Unorm = 90 | 16-bit-per-channel unsigned floating-point red/green/blue/alpha channel data format with normalized value. Values are in the |
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 |
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 |
R16G16B16Snorm = 84 | 16-bit-per-channel signed floating-point red/green/blue channel data format with normalized value. Values are in the |
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 |
R16G16B16Uint = 87 | 16-bit-per-channel unsigned integer red/green/blue channel data format. Values are in the |
R16G16B16Unorm = 83 | 16-bit-per-channel unsigned floating-point red/green/blue channel data format with normalized value. Values are in the |
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 |
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 |
R16G16Snorm = 77 | 16-bit-per-channel signed floating-point red/green channel data format with normalized value. Values are in the |
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 |
R16G16Uint = 80 | 16-bit-per-channel unsigned integer red/green channel data format. Values are in the |
R16G16Unorm = 76 | 16-bit-per-channel unsigned floating-point red/green channel data format with normalized value. Values are in the |
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 |
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 |
R16Snorm = 70 | 16-bit-per-channel signed floating-point red channel data format with normalized value. Values are in the |
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 |
R16Uint = 73 | 16-bit-per-channel unsigned integer red channel data format. Values are in the |
R16Unorm = 69 | 16-bit-per-channel unsigned floating-point red channel data format with normalized value. Values are in the |
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 |
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 |
R32G32B32A32Uint = 106 | 32-bit-per-channel unsigned integer red/green/blue/alpha channel data format. Values are in the |
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 |
R32G32B32Uint = 103 | 32-bit-per-channel unsigned integer red/green/blue channel data format. Values are in the |
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 |
R32G32Uint = 100 | 32-bit-per-channel unsigned integer red/green channel data format. Values are in the |
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 |
R32Uint = 97 | 32-bit-per-channel unsigned integer red channel data format. Values are in the |
R4G4B4A4UnormPack16 = 1 | 4-bit-per-channel red/green/blue/alpha channel data format, packed into 16 bits. Values are in the |
R4G4UnormPack8 = 0 | 4-bit-per-channel red/green channel data format, packed into 8 bits. Values are in the |
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 |
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 |
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 |
R64G64B64A64Uint = 118 | 64-bit-per-channel unsigned integer red/green/blue/alpha channel data format. Values are in the |
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 |
R64G64B64Uint = 115 | 64-bit-per-channel unsigned integer red/green/blue channel data format. Values are in the |
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 |
R64G64Uint = 112 | 64-bit-per-channel unsigned integer red/green channel data format. Values are in the |
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 |
R64Uint = 109 | 64-bit-per-channel unsigned integer red channel data format. Values are in the |
R8G8B8A8Sint = 41 | 8-bit-per-channel signed integer red/green/blue/alpha channel data format. Values are in the |
R8G8B8A8Snorm = 37 | 8-bit-per-channel signed floating-point red/green/blue/alpha channel data format with normalized value. Values are in the |
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 |
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 |
R8G8B8A8Uint = 40 | 8-bit-per-channel unsigned integer red/green/blue/alpha channel data format. Values are in the |
R8G8B8A8Unorm = 36 | 8-bit-per-channel unsigned floating-point red/green/blue/alpha channel data format with normalized value. Values are in the |
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 |
R8G8B8Sint = 27 | 8-bit-per-channel signed integer red/green/blue channel data format. Values are in the |
R8G8B8Snorm = 23 | 8-bit-per-channel signed floating-point red/green/blue channel data format with normalized value. Values are in the |
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 |
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 |
R8G8B8Uint = 26 | 8-bit-per-channel unsigned integer red/green/blue channel data format. Values are in the |
R8G8B8Unorm = 22 | 8-bit-per-channel unsigned floating-point red/green/blue channel data format with normalized value. Values are in the |
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 |
R8G8Sint = 20 | 8-bit-per-channel signed integer red/green channel data format. Values are in the |
R8G8Snorm = 16 | 8-bit-per-channel signed floating-point red/green channel data format with normalized value. Values are in the |
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 |
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 |
R8G8Uint = 19 | 8-bit-per-channel unsigned integer red/green channel data format. Values are in the |
R8G8Unorm = 15 | 8-bit-per-channel unsigned floating-point red/green channel data format with normalized value. Values are in the |
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 |
R8Sint = 13 | 8-bit-per-channel signed integer red channel data format. Values are in the |
R8Snorm = 9 | 8-bit-per-channel signed floating-point red channel data format with normalized value. Values are in the |
R8Srgb = 14 | 8-bit-per-channel unsigned floating-point red channel data format with normalized value and nonlinear sRGB encoding. Values are in the |
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 |
R8Uint = 12 | 8-bit-per-channel unsigned integer red channel data format. Values are in the |
R8Unorm = 8 | 8-bit-per-channel unsigned floating-point red channel data format with normalized value. Values are in the |
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 |
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 |
RenderingDevice.DeviceType
| Value | Description |
|---|---|
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 |
DiscreteGpu = 2 | Rendering device is a dedicated GPU, which is typically (but not always) faster than integrated GPUs ( |
IntegratedGpu = 1 | Rendering device is an integrated GPU, which is typically (but not always) slower than dedicated GPUs ( |
Max = 5 | Represents the size of the |
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.DrawFlags
| Value | Description |
|---|---|
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
| Value | Description |
|---|---|
Buffer = 10 | Buffer of any kind of (storage, vertex, etc.).
|
CommandQueue = 3 | The main graphics-compute command queue (
|
ComputePipeline = 11 |
|
LogicalDevice = 0 | Specific device object based on a physical device (
|
PhysicalDevice = 1 | Physical device the specific logical device is based on (
|
QueueFamily = 4 | The specific family the main queue belongs to (
|
RenderPipeline = 12 |
|
Sampler = 8 |
|
Texture = 5 |
|
TextureDataFormat = 7 | The native id of the data format of the texture.
|
TextureView = 6 | The view of an owned or shared texture.
|
TopmostObject = 2 | Top-most graphics API entry object (
|
UniformSet = 9 |
|
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
| Value | Description |
|---|---|
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
| Value | Description |
|---|---|
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 |
Read = 0 | |
Store = 0 | Store the result of the draw list in the framebuffer. This is generally what you want to do. |
RenderingDevice.IndexBufferFormat
| Value | Description |
|---|---|
Uint16 = 0 | Index buffer in 16-bit unsigned integer format. This limits the maximum index that can be specified to |
Uint32 = 1 | Index buffer in 32-bit unsigned integer format. This limits the maximum index that can be specified to |
RenderingDevice.InitialAction
| Value | Description |
|---|---|
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.Limit
| Value | Description |
|---|---|
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 |
MetalfxTemporalScalerMinScale = 46 | Returns the smallest value for |
MinUniformBufferOffsetAlignment = 26 | Minimum uniform buffer offset alignment. |
RenderingDevice.LogicOperation
| Value | Description |
|---|---|
And = 1 | AND logic operation. |
AndInverted = 4 | AND logic operation with the source operand being inverted. See also |
AndReverse = 2 | AND logic operation with the destination operand being inverted. See also |
Clear = 0 | Clear logic operation (result is always |
Copy = 3 | Copy logic operation (keeps the source value as-is). See also |
CopyInverted = 12 | NOT logic operation (inverts the value). See also |
Equivalent = 9 | Not-XOR (XNOR) logic operation. |
Invert = 10 | Invert logic operation. |
Max = 16 | Represents the size of the |
Nand = 14 | Not-AND (NAND) logic operation. |
NoOp = 5 | No-op logic operation (keeps the destination value as-is). See also |
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 |
OrReverse = 11 | OR logic operation with the destination operand being inverted. See also |
Set = 15 | SET logic operation (result is always |
Xor = 6 | Exclusive or (XOR) logic operation. |
RenderingDevice.MemoryType
| Value | Description |
|---|---|
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.PipelineDynamicStateFlags
| Value | Description |
|---|---|
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
RenderingDevice.PolygonCullMode
| Value | Description |
|---|---|
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
| Value | Description |
|---|---|
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
| Value | Description |
|---|---|
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 |
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
| Value | Description |
|---|---|
FloatOpaqueBlack = 2 | Return a floating-point opaque black color when sampling outside the |
FloatOpaqueWhite = 4 | Return a floating-point opaque white color when sampling outside the |
FloatTransparentBlack = 0 | Return a floating-point transparent black color when sampling outside the |
IntOpaqueBlack = 3 | Return an integer opaque black color when sampling outside the |
IntOpaqueWhite = 5 | Return an integer opaque white color when sampling outside the |
IntTransparentBlack = 1 | Return an integer transparent black color when sampling outside the |
Max = 6 | Represents the size of the |
RenderingDevice.SamplerFilter
| Value | Description |
|---|---|
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
| Value | Description |
|---|---|
ClampToBorder = 3 | Sample with repeating disabled. When sampling outside the |
ClampToEdge = 2 | Sample with repeating disabled. When sampling outside the |
Max = 5 | Represents the size of the |
MirrorClampToEdge = 4 | Sample with mirrored repeating enabled, but only once. When sampling in the |
MirroredRepeat = 1 | Sample with mirrored repeating enabled. When sampling outside the |
Repeat = 0 | Sample with repeating enabled. |
RenderingDevice.ShaderLanguage
RenderingDevice.ShaderStage
| Value | Description |
|---|---|
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 |
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 |
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 |
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 |
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 |
Max = 10 | Represents the size of the |
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 |
Raygen = 5 | Ray generation shader stage. This can be used to generate primary rays. |
RaygenBit = 32 | Ray generation shader stage bit (see also |
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 |
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 |
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.StencilOperation
| Value | Description |
|---|---|
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 |
Invert = 5 | Bitwise-invert the existing stencil value. |
Keep = 0 | Keep the current stencil value. |
Max = 8 | Represents the size of the |
Replace = 2 | Replace the existing stencil value with the new one. |
Zero = 1 | Set the stencil value to |
RenderingDevice.StorageBufferUsage
| Value | Description |
|---|---|
Indirect = 1 |
RenderingDevice.TextureSamples
| Value | Description |
|---|---|
Max = 7 | Represents the size of the |
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
| Value | Description |
|---|---|
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
| Value | Description |
|---|---|
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 |
One = 2 | Always return |
R = 3 | Sample the red color channel. |
Zero = 1 | Always return |
RenderingDevice.TextureType
| Value | Description |
|---|---|
Cube = 3 |
|
CubeArray = 6 | Array of |
Max = 7 | Represents the size of the |
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
| Value | Description |
|---|---|
CanCopyFromBit = 128 | Texture can be a source for |
CanCopyToBit = 256 | Texture can be a destination for |
CanUpdateBit = 64 | Texture can be updated using |
ColorAttachmentBit = 2 | Texture can be used as a color attachment in a framebuffer. |
CpuReadBit = 32 | Texture can be read back on the CPU using |
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
| Value | Description |
|---|---|
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 |
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
| Value | Description |
|---|---|
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. |