Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

RDShaderSource

Inherits: RefCounted < Object

Shader source code (used by RenderingDevice).

Description

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.

Properties

ShaderLanguage

language

0

String

source_compute

""

String

source_fragment

""

String

source_tesselation_control

""

String

source_tesselation_evaluation

""

String

source_vertex

""

Methods

String

get_stage_source ( ShaderStage stage ) const

void

set_stage_source ( ShaderStage stage, String source )


Property Descriptions

ShaderLanguage language = 0

The language the shader is written in.


String source_compute = ""

Source code for the shader's compute stage.


String source_fragment = ""