2020-04-20 02:19:21 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
2023-07-06 08:08:05 +00:00
<class name= "RDShaderSource" inherits= "RefCounted" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../class.xsd" >
2020-04-20 02:19:21 +00:00
<brief_description >
2023-03-28 15:32:29 +00:00
Shader source code (used by [RenderingDevice]).
2020-04-20 02:19:21 +00:00
</brief_description>
<description >
2023-03-28 15:32:29 +00:00
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.
2020-04-20 02:19:21 +00:00
</description>
<tutorials >
</tutorials>
<methods >
<method name= "get_stage_source" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "String" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "stage" type= "int" enum= "RenderingDevice.ShaderStage" />
2020-04-20 02:19:21 +00:00
<description >
2023-03-28 15:32:29 +00:00
Returns source code for the specified shader [param stage]. Equivalent to getting one of [member source_compute], [member source_fragment], [member source_tesselation_control], [member source_tesselation_evaluation] or [member source_vertex].
2020-04-20 02:19:21 +00:00
</description>
</method>
<method name= "set_stage_source" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "stage" type= "int" enum= "RenderingDevice.ShaderStage" />
<param index= "1" name= "source" type= "String" />
2020-04-20 02:19:21 +00:00
<description >
2023-03-28 15:32:29 +00:00
Sets [param source] code for the specified shader [param stage]. Equivalent to setting one of [member source_compute], [member source_fragment], [member source_tesselation_control], [member source_tesselation_evaluation] or [member source_vertex].
2020-04-20 02:19:21 +00:00
</description>
</method>
</methods>
<members >
<member name= "language" type= "int" setter= "set_language" getter= "get_language" enum= "RenderingDevice.ShaderLanguage" default= "0" >
2023-03-28 15:32:29 +00:00
The language the shader is written in.
2020-04-20 02:19:21 +00:00
</member>
<member name= "source_compute" type= "String" setter= "set_stage_source" getter= "get_stage_source" default= """" >
2023-03-28 15:32:29 +00:00
Source code for the shader's compute stage.
2020-04-20 02:19:21 +00:00
</member>
<member name= "source_fragment" type= "String" setter= "set_stage_source" getter= "get_stage_source" default= """" >
2023-03-28 15:32:29 +00:00
Source code for the shader's fragment stage.
2020-04-20 02:19:21 +00:00
</member>
<member name= "source_tesselation_control" type= "String" setter= "set_stage_source" getter= "get_stage_source" default= """" >
2023-03-28 15:32:29 +00:00
Source code for the shader's tessellation control stage.
2020-04-20 02:19:21 +00:00
</member>
<member name= "source_tesselation_evaluation" type= "String" setter= "set_stage_source" getter= "get_stage_source" default= """" >
2023-03-28 15:32:29 +00:00
Source code for the shader's tessellation evaluation stage.
2020-04-20 02:19:21 +00:00
</member>
<member name= "source_vertex" type= "String" setter= "set_stage_source" getter= "get_stage_source" default= """" >
2023-03-28 15:32:29 +00:00
Source code for the shader's vertex stage.
2020-04-20 02:19:21 +00:00
</member>
</members>
</class>