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
Eredita: Resource < RefCounted < Object
Rappresentazione intermedia in SPIR-V, come parte di un RDShaderFile (utilizzato da RenderingDevice).
Descrizione
RDShaderSPIRV rappresenta il codice SPIR-V di un RDShaderFile per le varie fasi di uno shader, nonché possibili messaggi di errore di compilazione. SPIR-V è una rappresentazione intermedia di basso livello per gli shader. Questa rappresentazione intermedia non è utilizzata direttamente dalle GPU per il rendering, ma è possibile compilarla in shader binari che le GPU possono comprendere. A differenza degli shader compilati, SPIR-V è portabile tra modelli di GPU e versioni di driver.
Questo oggetto è utilizzato da RenderingDevice.
Proprietà
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Metodi
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) |
Descrizioni delle proprietà
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
Il bytecode in SPIR-V per la fase di calcolo dello shader.
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
Il bytecode in SPIR-V per la fase di frammento dello shader.
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
Il bytecode in SPIR-V per la fase di controllo della tassellatura dello shader.
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
Il bytecode in SPIR-V per la fase di valutazione della tassellatura dello shader.
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
Il bytecode in SPIR-V per la fase di vertice dello shader.
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
Il messaggio di errore di compilazione per la fase di calcolo dello shader (impostato dal compilatore SPIR-V e da Godot). Se vuoto, la compilazione dello shader è riuscita.
String compile_error_fragment = "" 🔗
void set_stage_compile_error(stage: ShaderStage, compile_error: String)
String get_stage_compile_error(stage: ShaderStage) const
Il messaggio di errore di compilazione per la fase di frammento dello shader (impostato dal compilatore SPIR-V e da Godot). Se vuoto, la compilazione dello shader è riuscita.
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
Il messaggio di errore di compilazione per la fase di controllo della tassellatura dello shader (impostato dal compilatore SPIR-V e da Godot). Se vuoto, la compilazione dello shader è riuscita.
String compile_error_tesselation_evaluation = "" 🔗
void set_stage_compile_error(stage: ShaderStage, compile_error: String)
String get_stage_compile_error(stage: ShaderStage) const
Il messaggio di errore di compilazione per la fase di valutazione della tassellatura dello shader (impostato dal compilatore SPIR-V e da Godot). Se vuoto, la compilazione dello shader è riuscita.
String compile_error_vertex = "" 🔗
void set_stage_compile_error(stage: ShaderStage, compile_error: String)
String get_stage_compile_error(stage: ShaderStage) const
Il messaggio di errore di compilazione per la fase di vertice dello shader (impostato dal compilatore SPIR-V e da Godot). Se vuoto, la compilazione dello shader è riuscita.
Descrizioni dei metodi
PackedByteArray get_stage_bytecode(stage: ShaderStage) const 🔗
Equivale a ottenere uno tra bytecode_compute, bytecode_fragment, bytecode_tesselation_control, bytecode_tesselation_evaluation, bytecode_vertex.
String get_stage_compile_error(stage: ShaderStage) const 🔗
Restituisce il messaggio di errore di compilazione per la fase stage dello shader. Equivale a ottenere uno tra 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) 🔗
Imposta il bytecode in SPIR-V per la fase stage dello shader su bytecode. Equivale a impostare uno tra bytecode_compute, bytecode_fragment, bytecode_tesselation_control, bytecode_tesselation_evaluation, bytecode_vertex.
void set_stage_compile_error(stage: ShaderStage, compile_error: String) 🔗
Imposta il messaggio di errore di compilazione per la fase stage dello shader su compile_error. Equivale a impostare uno tra compile_error_compute, compile_error_fragment, compile_error_tesselation_control, compile_error_tesselation_evaluation, compile_error_vertex.