ComputeShaderKernel

Inherits: Resource

Description

A single entry-point of a ComputeShaderFile. Contains both the compiled SPIR-V associated with the kernel, and reflection metadata related to this particular kernel within a shader.

Properties

StringName

kernel_name

&""

StructTypeLayoutShape

parameters

int

slot_offset

0

int

space_offset

0

RDShaderSPIRV

spirv

Vector3i

thread_group_size

Vector3i(0, 0, 0)

Dictionary

used_binding_sets

{}

Dictionary

user_attributes

{}


Property Descriptions

StringName kernel_name = &"" 🔗

  • void set_kernel_name(value: StringName)

  • StringName get_kernel_name()

The name of this kernel. By default, this will match the entry-point function name declared in the shader.


StructTypeLayoutShape parameters 🔗

Get the reflection information of the parameters for this kernel. You typically won't need to access this, but it is used under the hood by ComputeShaderTask to bind data to the correct descriptor slots.


int slot_offset = 0 🔗

  • void set_slot_offset(value: int)

  • int get_slot_offset()

The slot offset of this kernel's parameters, relative to the global parameters.


int space_offset = 0 🔗

  • void set_space_offset(value: int)

  • int get_space_offset()

The space offset of this kernel's parameters, relative to the global parameters.


RDShaderSPIRV spirv 🔗

  • void set_spirv(value: RDShaderSPIRV)

  • RDShaderSPIRV get_spirv()

The SPIR-V intermediate representation of this kernel.


Vector3i thread_group_size = Vector3i(0, 0, 0) 🔗

  • void set_thread_group_size(value: Vector3i)

  • Vector3i get_thread_group_size()

The thread group size declared for this kernel.


Dictionary used_binding_sets = {} 🔗

  • void set_used_binding_sets(value: Dictionary)

  • Dictionary get_used_binding_sets()

The binding sets that are used by this kernel. The key is the binding set index, and the value is true/false.


Dictionary user_attributes = {} 🔗

  • void set_user_attributes(value: Dictionary)

  • Dictionary get_user_attributes()

Reflection information about any declared attributes on the entry-point function.