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

Hereda: RefCounted < Object

Código fuente del shader (utilizado por RenderingDevice).

Descripción

Shader source code in text form.

See also RDShaderFile. RDShaderSource is only meant to be used with the RenderingDevice API. It should not be confused with Godot's own Shader resource, which is what Godot's various nodes use for high-level shader programming.

Propiedades

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

""

Métodos

String

get_stage_source(stage: ShaderStage) const

void

set_stage_source(stage: ShaderStage, source: String)


Descripciones de Propiedades

ShaderLanguage language = 0 🔗

El lenguaje en el que está escrito el 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 = "" 🔗

Código fuente para la etapa de cálculo del shader.


String source_fragment = "" 🔗

Código fuente para la etapa de fragmento del 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 = "" 🔗

Código fuente para la etapa de control de teselación del shader.


String source_tesselation_evaluation = "" 🔗

Código fuente para la etapa de evaluación de teselación del shader.


String source_vertex = "" 🔗

Código fuente para la etapa de vértice del shader.


Descripciones de Métodos

String get_stage_source(stage: ShaderStage) const 🔗

Returns source code for the specified shader stage. Equivalent to getting one of source_compute, source_fragment, source_tesselation_control, source_tesselation_evaluation or source_vertex.


void set_stage_source(stage: ShaderStage, source: String) 🔗

Sets source code for the specified shader stage. Equivalent to setting one of source_compute, source_fragment, source_tesselation_control, source_tesselation_evaluation or source_vertex.

Note: If you set the compute shader source code using this method directly, remember to remove the Godot-specific hint #[compute].