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.

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à

ShaderLanguage

language

0

String

source_any_hit

""

String

source_closest_hit

""

String

source_compute

""

String

source_fragment

""

String

source_intersection

""

String

source_miss

""

String

source_raygen

""

String

source_tesselation_control

""

String

source_tesselation_evaluation

""

String

source_vertex

""

Metodi

String

get_stage_source(stage: ShaderStage) const

void

set_stage_source(stage: ShaderStage, source: String)


Descrizioni delle proprietà

ShaderLanguage language = 0 🔗

Il linguaggio in cui è scritto lo shader.


String source_any_hit = "" 🔗

Source code for the shader's any hit stage.


String source_closest_hit = "" 🔗

Source code for the shader's closest hit stage.


String source_compute = "" 🔗

Codice sorgente per la fase di calcolo dello shader.


String source_fragment = "" 🔗

Codice sorgente per la fase di frammento dello shader.


String source_intersection = "" 🔗

Source code for the shader's intersection stage.


String source_miss = "" 🔗

Source code for the shader's miss stage.


String source_raygen = "" 🔗

Source code for the shader's ray generation stage.


String source_tesselation_control = "" 🔗

Codice sorgente per la fase di controllo della tassellatura dello shader.


String source_tesselation_evaluation = "" 🔗

Codice sorgente per la fase di valutazione della tassellatura dello shader.


String source_vertex = "" 🔗

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].