Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
RDShaderSPIRV¶
Inherits: Resource < RefCounted < Object
SPIR-V intermediate representation as part of a RDShaderFile (used by RenderingDevice).
描述¶
RDShaderSPIRV represents a RDShaderFile's SPIR-V code for various shader stages, as well as possible compilation error messages. SPIR-V 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.
属性¶
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Methods¶
get_stage_bytecode ( ShaderStage stage ) const |
|
get_stage_compile_error ( ShaderStage stage ) const |
|
void |
set_stage_bytecode ( ShaderStage stage, PackedByteArray bytecode ) |
void |
set_stage_compile_error ( ShaderStage stage, String compile_error ) |
Property Descriptions¶
PackedByteArray bytecode_compute = PackedByteArray()
void set_stage_bytecode ( ShaderStage stage, PackedByteArray bytecode )
PackedByteArray get_stage_bytecode ( ShaderStage stage ) const
The SPIR-V bytecode for the compute shader stage.
PackedByteArray bytecode_fragment = PackedByteArray()
void set_stage_bytecode ( ShaderStage stage, PackedByteArray bytecode )
PackedByteArray get_stage_bytecode ( ShaderStage stage ) const
The SPIR-V bytecode for the fragment shader stage.
PackedByteArray bytecode_tesselation_control = PackedByteArray()
void set_stage_bytecode ( ShaderStage stage, PackedByteArray bytecode )
PackedByteArray get_stage_bytecode ( ShaderStage stage ) const
The SPIR-V bytecode for the tessellation control shader stage.
PackedByteArray bytecode_tesselation_evaluation = PackedByteArray()
void set_stage_bytecode ( ShaderStage stage, PackedByteArray bytecode )
PackedByteArray get_stage_bytecode ( ShaderStage stage ) const
The SPIR-V bytecode for the tessellation evaluation shader stage.
PackedByteArray bytecode_vertex = PackedByteArray()
void set_stage_bytecode ( ShaderStage stage, PackedByteArray bytecode )
PackedByteArray get_stage_bytecode ( ShaderStage stage ) const
The SPIR-V bytecode for the vertex shader stage.
String compile_error_compute = ""
void set_stage_compile_error ( ShaderStage stage, String compile_error )
String get_stage_compile_error ( ShaderStage stage ) const
The compilation error message for the compute shader stage (set by the SPIR-V compiler and Godot). If empty, shader compilation was successful.
String compile_error_fragment = ""
void set_stage_compile_error ( ShaderStage stage, String compile_error )
String get_stage_compile_error ( ShaderStage stage ) const
The compilation error message for the fragment shader stage (set by the SPIR-V compiler and Godot). If empty, shader compilation was successful.
String compile_error_tesselation_control = ""
void set_stage_compile_error ( ShaderStage stage, String compile_error )
String get_stage_compile_error ( ShaderStage stage ) const
The compilation error message for the tessellation control shader stage (set by the SPIR-V compiler and Godot). If empty, shader compilation was successful.
String compile_error_tesselation_evaluation = ""
void set_stage_compile_error ( ShaderStage stage, String compile_error )
String get_stage_compile_error ( ShaderStage stage ) const
The compilation error message for the tessellation evaluation shader stage (set by the SPIR-V compiler and Godot). If empty, shader compilation was successful.
String compile_error_vertex = ""
void set_stage_compile_error ( ShaderStage stage, String compile_error )
String get_stage_compile_error ( ShaderStage stage ) const
The compilation error message for the vertex shader stage (set by the SPIR-V compiler and Godot). If empty, shader compilation was successful.
Method Descriptions¶
PackedByteArray get_stage_bytecode ( ShaderStage stage ) const
Equivalent to getting one of bytecode_compute, bytecode_fragment, bytecode_tesselation_control, bytecode_tesselation_evaluation, bytecode_vertex.
String get_stage_compile_error ( ShaderStage stage ) const
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.
void set_stage_bytecode ( ShaderStage stage, PackedByteArray bytecode )
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.
void set_stage_compile_error ( ShaderStage stage, String compile_error )
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.