RDShaderSource
Eredita: RefCounted < Object
Codice sorgente dello shader (utilizzato da RenderingDevice).
Descrizione
Codice sorgente shader in formato testuale.
Vedi anche RDShaderFile. RDShaderSource è pensato per essere utilizzato solo con l'API RenderingDevice. Non deve essere confuso con la risorsa Shader di Godot, che è quella che i vari nodi di Godot usano per la programmazione di shader di alto livello.
Proprietà
|
||
|
||
|
||
|
||
|
||
|
Metodi
get_stage_source(stage: ShaderStage) const |
|
void |
set_stage_source(stage: ShaderStage, source: String) |
Descrizioni delle proprietà
ShaderLanguage language = 0 🔗
void set_language(value: ShaderLanguage)
ShaderLanguage get_language()
Il linguaggio in cui è scritto lo shader.
void set_stage_source(stage: ShaderStage, source: String)
String get_stage_source(stage: ShaderStage) const
Codice sorgente per la fase di calcolo dello shader.
void set_stage_source(stage: ShaderStage, source: String)
String get_stage_source(stage: ShaderStage) const
Codice sorgente per la fase di frammento dello shader.
String source_tesselation_control = "" 🔗
void set_stage_source(stage: ShaderStage, source: String)
String get_stage_source(stage: ShaderStage) const
Codice sorgente per la fase di controllo della tassellatura dello shader.
String source_tesselation_evaluation = "" 🔗
void set_stage_source(stage: ShaderStage, source: String)
String get_stage_source(stage: ShaderStage) const
Codice sorgente per la fase di valutazione della tassellatura dello shader.
void set_stage_source(stage: ShaderStage, source: String)
String get_stage_source(stage: ShaderStage) const
Codice sorgente per la fase di vertice dello shader.
Descrizioni dei metodi
String get_stage_source(stage: ShaderStage) const 🔗
Restituisce il codice sorgente per la fase stage dello shader. Equivale a ottenere uno tra source_compute, source_fragment, source_tesselation_control, source_tesselation_evaluation o source_vertex.
void set_stage_source(stage: ShaderStage, source: String) 🔗
Imposta il codice sorgente per la fase stage dello shader su source. Equivale a impostare uno tra source_compute, source_fragment, source_tesselation_control, source_tesselation_evaluation o source_vertex.
Nota: Se imposti il codice sorgente dello shader di calcolo utilizzando questo metodo direttamente, ricordati di rimuovere l'indicazionespecifica di Godot #[compute].