RDShaderSPIRV represents a RDShaderFile's SPIR-V code for various shader stages, as well as possible compilation error messages. SPIR-V is a low-level intermediate shader representation. This intermediate representation is not used directly by GPUs for rendering, but it can be compiled into binary shaders that GPUs can understand. Unlike compiled shaders, SPIR-V is portable across GPU models and driver versions.
This object is used by RenderingDevice.
The SPIR-V bytecode for the compute shader stage.
Note: The returned array is copied and any changes to it will not update the original property value. See PackedByteArray for more details.
The SPIR-V bytecode for the fragment shader stage.
Note: The returned array is copied and any changes to it will not update the original property value. See PackedByteArray for more details.
The SPIR-V bytecode for the tessellation control shader stage.
Note: The returned array is copied and any changes to it will not update the original property value. See PackedByteArray for more details.
The SPIR-V bytecode for the tessellation evaluation shader stage.
Note: The returned array is copied and any changes to it will not update the original property value. See PackedByteArray for more details.
The SPIR-V bytecode for the vertex shader stage.
Note: The returned array is copied and any changes to it will not update the original property value. See PackedByteArray for more details.
The compilation error message for the compute shader stage (set by the SPIR-V compiler and Godot). If empty, shader compilation was successful.
The compilation error message for the fragment shader stage (set by the SPIR-V compiler and Godot). If empty, shader compilation was successful.
The compilation error message for the tessellation control shader stage (set by the SPIR-V compiler and Godot). If empty, shader compilation was successful.
The compilation error message for the tessellation evaluation shader stage (set by the SPIR-V compiler and Godot). If empty, shader compilation was successful.
The compilation error message for the vertex shader stage (set by the SPIR-V compiler and Godot). If empty, shader compilation was successful.
Equivalent to getting one of bytecode_compute, bytecode_fragment, bytecode_tesselation_control, bytecode_tesselation_evaluation, bytecode_vertex.
Returns the compilation error message for the given shader stage
. Equivalent to getting one of compile_error_compute, compile_error_fragment, compile_error_tesselation_control, compile_error_tesselation_evaluation, compile_error_vertex.
Sets the SPIR-V bytecode
for the given shader stage
. Equivalent to setting one of bytecode_compute, bytecode_fragment, bytecode_tesselation_control, bytecode_tesselation_evaluation, bytecode_vertex.
Sets the compilation error message for the given shader stage
to compile_error
. Equivalent to setting one of compile_error_compute, compile_error_fragment, compile_error_tesselation_control, compile_error_tesselation_evaluation, compile_error_vertex.