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...
RDShaderSource
Наследует: RefCounted < Object
Исходный код шейдера (используется RenderingDevice).
Описание
Исходный код шейдера в текстовой форме.
См. также RDShaderFile. RDShaderSource предназначен только для использования с API RenderingDevice. Его не следует путать с собственным ресурсом Godot Shader, который различные узлы Godot используют для высокоуровневого программирования шейдеров.
Свойства
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Методы
get_stage_source(stage: ShaderStage) const |
|
void |
set_stage_source(stage: ShaderStage, source: String) |
Описания свойств
ShaderLanguage language = 0 🔗
void set_language(value: ShaderLanguage)
ShaderLanguage get_language()
Язык, на котором написан шейдер.
void set_stage_source(stage: ShaderStage, source: String)
String get_stage_source(stage: ShaderStage) const
Source code for the shader's any hit stage.
String source_closest_hit = "" 🔗
void set_stage_source(stage: ShaderStage, source: String)
String get_stage_source(stage: ShaderStage) const
Source code for the shader's closest hit stage.
void set_stage_source(stage: ShaderStage, source: String)
String get_stage_source(stage: ShaderStage) const
Исходный код для этапа вычислений (compute) шейдера.
void set_stage_source(stage: ShaderStage, source: String)
String get_stage_source(stage: ShaderStage) const
Исходный код для фрагментной стадии шейдера.
String source_intersection = "" 🔗
void set_stage_source(stage: ShaderStage, source: String)
String get_stage_source(stage: ShaderStage) const
Source code for the shader's intersection stage.
void set_stage_source(stage: ShaderStage, source: String)
String get_stage_source(stage: ShaderStage) const
Source code for the shader's miss stage.
void set_stage_source(stage: ShaderStage, source: String)
String get_stage_source(stage: ShaderStage) const
Source code for the shader's ray generation stage.
String source_tesselation_control = "" 🔗
void set_stage_source(stage: ShaderStage, source: String)
String get_stage_source(stage: ShaderStage) const
Исходный код для этапа управления тесселяцией шейдера.
String source_tesselation_evaluation = "" 🔗
void set_stage_source(stage: ShaderStage, source: String)
String get_stage_source(stage: ShaderStage) const
Исходный код для этапа оценки тесселяции шейдера.
void set_stage_source(stage: ShaderStage, source: String)
String get_stage_source(stage: ShaderStage) const
Исходный код для вершинного этапа шейдера.
Описания метода
String get_stage_source(stage: ShaderStage) const 🔗
Возвращает исходный код для указанного шейдера stage. Эквивалентно получению одного из source_compute, source_fragment, source_tesselation_control, source_tesselation_evaluation или source_vertex.
void set_stage_source(stage: ShaderStage, source: String) 🔗
Устанавливает код source для указанного шейдера stage. Эквивалентно установке одного из source_compute, source_fragment, source_tesselation_control, source_tesselation_evaluation или source_vertex.
Примечание: Если вы устанавливаете исходный код вычислительного шейдера, используя этот метод напрямую, не забудьте удалить специфичную для Godot подсказку #[compute].