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
Наследует: Resource < RefCounted < Object
Промежуточное представление SPIR-V как часть RDShaderFile (используется в RenderingDevice).
Описание
RDShaderSPIRV представляет код SPIR-V файла RDShaderFile для различных этапов шейдера, а также возможные сообщения об ошибках компиляции. SPIR-V — это низкоуровневое промежуточное представление шейдера. Это промежуточное представление не используется напрямую графическими процессорами для рендеринга, но может быть скомпилировано в двоичные шейдеры, понятные графическим процессорам. В отличие от скомпилированных шейдеров, SPIR-V переносим между моделями графических процессоров и версиями драйверов.
Этот объект используется в RenderingDevice.
Свойства
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Методы
get_stage_bytecode(stage: ShaderStage) const |
|
get_stage_compile_error(stage: ShaderStage) const |
|
void |
set_stage_bytecode(stage: ShaderStage, bytecode: PackedByteArray) |
void |
set_stage_compile_error(stage: ShaderStage, compile_error: String) |
Описания свойств
PackedByteArray bytecode_any_hit = PackedByteArray() 🔗
void set_stage_bytecode(stage: ShaderStage, bytecode: PackedByteArray)
PackedByteArray get_stage_bytecode(stage: ShaderStage) const
The SPIR-V bytecode for the any hit 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.
PackedByteArray bytecode_closest_hit = PackedByteArray() 🔗
void set_stage_bytecode(stage: ShaderStage, bytecode: PackedByteArray)
PackedByteArray get_stage_bytecode(stage: ShaderStage) const
The SPIR-V bytecode for the closest hit 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.
PackedByteArray bytecode_compute = PackedByteArray() 🔗
void set_stage_bytecode(stage: ShaderStage, bytecode: PackedByteArray)
PackedByteArray get_stage_bytecode(stage: ShaderStage) const
Байт-код SPIR-V для этапа вычислительного шейдера.
Note: The returned array is copied and any changes to it will not update the original property value. See PackedByteArray for more details.
PackedByteArray bytecode_fragment = PackedByteArray() 🔗
void set_stage_bytecode(stage: ShaderStage, bytecode: PackedByteArray)
PackedByteArray get_stage_bytecode(stage: ShaderStage) const
Байт-код SPIR-V для этапа фрагментного шейдера.
Note: The returned array is copied and any changes to it will not update the original property value. See PackedByteArray for more details.
PackedByteArray bytecode_intersection = PackedByteArray() 🔗
void set_stage_bytecode(stage: ShaderStage, bytecode: PackedByteArray)
PackedByteArray get_stage_bytecode(stage: ShaderStage) const
The SPIR-V bytecode for the intersection 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.
PackedByteArray bytecode_miss = PackedByteArray() 🔗
void set_stage_bytecode(stage: ShaderStage, bytecode: PackedByteArray)
PackedByteArray get_stage_bytecode(stage: ShaderStage) const
The SPIR-V bytecode for the miss 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.
PackedByteArray bytecode_raygen = PackedByteArray() 🔗
void set_stage_bytecode(stage: ShaderStage, bytecode: PackedByteArray)
PackedByteArray get_stage_bytecode(stage: ShaderStage) const
The SPIR-V bytecode for the ray generation 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.
PackedByteArray bytecode_tesselation_control = PackedByteArray() 🔗
void set_stage_bytecode(stage: ShaderStage, bytecode: PackedByteArray)
PackedByteArray get_stage_bytecode(stage: ShaderStage) const
Байт-код SPIR-V для этапа шейдера управления тесселяцией.
Note: The returned array is copied and any changes to it will not update the original property value. See PackedByteArray for more details.
PackedByteArray bytecode_tesselation_evaluation = PackedByteArray() 🔗
void set_stage_bytecode(stage: ShaderStage, bytecode: PackedByteArray)
PackedByteArray get_stage_bytecode(stage: ShaderStage) const
Байт-код SPIR-V для этапа шейдера оценки тесселяции.
Note: The returned array is copied and any changes to it will not update the original property value. See PackedByteArray for more details.
PackedByteArray bytecode_vertex = PackedByteArray() 🔗
void set_stage_bytecode(stage: ShaderStage, bytecode: PackedByteArray)
PackedByteArray get_stage_bytecode(stage: ShaderStage) const
Байт-код SPIR-V для этапа вершинного шейдера.
Note: The returned array is copied and any changes to it will not update the original property value. See PackedByteArray for more details.
String compile_error_any_hit = "" 🔗
void set_stage_compile_error(stage: ShaderStage, compile_error: String)
String get_stage_compile_error(stage: ShaderStage) const
The compilation error message for the any hit shader stage (set by the SPIR-V compiler and Godot). If empty, shader compilation was successful.
String compile_error_closest_hit = "" 🔗
void set_stage_compile_error(stage: ShaderStage, compile_error: String)
String get_stage_compile_error(stage: ShaderStage) const
The compilation error message for the closest hit shader stage (set by the SPIR-V compiler and Godot). If empty, shader compilation was successful.
String compile_error_compute = "" 🔗
void set_stage_compile_error(stage: ShaderStage, compile_error: String)
String get_stage_compile_error(stage: ShaderStage) const
Сообщение об ошибке компиляции для этапа вычислительного шейдера (устанавливается компилятором SPIR-V и Godot). Если пусто, компиляция шейдера прошла успешно.
String compile_error_fragment = "" 🔗
void set_stage_compile_error(stage: ShaderStage, compile_error: String)
String get_stage_compile_error(stage: ShaderStage) const
Сообщение об ошибке компиляции для этапа фрагментного шейдера (устанавливается компилятором SPIR-V и Godot). Если пусто, компиляция шейдера прошла успешно.
String compile_error_intersection = "" 🔗
void set_stage_compile_error(stage: ShaderStage, compile_error: String)
String get_stage_compile_error(stage: ShaderStage) const
The compilation error message for the intersection shader stage (set by the SPIR-V compiler and Godot). If empty, shader compilation was successful.
String compile_error_miss = "" 🔗
void set_stage_compile_error(stage: ShaderStage, compile_error: String)
String get_stage_compile_error(stage: ShaderStage) const
The compilation error message for the miss shader stage (set by the SPIR-V compiler and Godot). If empty, shader compilation was successful.
String compile_error_raygen = "" 🔗
void set_stage_compile_error(stage: ShaderStage, compile_error: String)
String get_stage_compile_error(stage: ShaderStage) const
The compilation error message for the ray generation 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(stage: ShaderStage, compile_error: String)
String get_stage_compile_error(stage: ShaderStage) const
Сообщение об ошибке компиляции для этапа шейдера управления тесселяцией (устанавливается компилятором SPIR-V и Godot). Если пусто, компиляция шейдера прошла успешно.
String compile_error_tesselation_evaluation = "" 🔗
void set_stage_compile_error(stage: ShaderStage, compile_error: String)
String get_stage_compile_error(stage: ShaderStage) const
Сообщение об ошибке компиляции для этапа шейдера оценки тесселяции (устанавливается компилятором SPIR-V и Godot). Если пусто, компиляция шейдера прошла успешно.
String compile_error_vertex = "" 🔗
void set_stage_compile_error(stage: ShaderStage, compile_error: String)
String get_stage_compile_error(stage: ShaderStage) const
Сообщение об ошибке компиляции для этапа вершинного шейдера (устанавливается компилятором SPIR-V и Godot). Если пусто, компиляция шейдера прошла успешно.
Описания метода
PackedByteArray get_stage_bytecode(stage: ShaderStage) const 🔗
Эквивалентно получению одного из bytecode_compute, bytecode_fragment, bytecode_tesselation_control, bytecode_tesselation_evaluation, bytecode_vertex.
String get_stage_compile_error(stage: ShaderStage) const 🔗
Возвращает сообщение об ошибке компиляции для указанного шейдера stage. Эквивалентно получению одного из compile_error_compute, compile_error_fragment, compile_error_tesselation_control, compile_error_tesselation_evaluation, compile_error_vertex.
void set_stage_bytecode(stage: ShaderStage, bytecode: PackedByteArray) 🔗
Устанавливает SPIR-V bytecode для заданного шейдера stage. Эквивалентно установке одного из bytecode_compute, bytecode_fragment, bytecode_tesselation_control, bytecode_tesselation_evaluation, bytecode_vertex.
void set_stage_compile_error(stage: ShaderStage, compile_error: String) 🔗
Устанавливает сообщение об ошибке компиляции для заданного шейдера stage на compile_error. Эквивалентно установке одного из compile_error_compute, compile_error_fragment, compile_error_tesselation_control, compile_error_tesselation_evaluation, compile_error_vertex.