Added some quick info on shaders to the docs

(cherry picked from commit b7ae2ca128)
This commit is contained in:
Bastiaan Olij 2018-05-26 12:08:34 +10:00 committed by Hein-Pieter van Braam
parent b27352a401
commit 6843ccf462
2 changed files with 8 additions and 2 deletions

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Shader" inherits="Resource" category="Core" version="3.0.2">
<brief_description>
To be changed, ignore.
A custom shader program.
</brief_description>
<description>
To be changed, ignore.
This class allows you to define a custom shader program that can be used for various materials to render objects.
</description>
<tutorials>
http://docs.godotengine.org/en/3.0/tutorials/shading/index.html
@ -24,6 +24,7 @@
<return type="int" enum="Shader.Mode">
</return>
<description>
Returns the shader mode for the shader, eiter [code]MODE_CANVAS_ITEM[/code], [code]MODE_SPATIAL[/code] or [code]MODE_PARTICLES[/code]
</description>
</method>
<method name="has_param" qualifiers="const">

View File

@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ShaderMaterial" inherits="Material" category="Core" version="3.0.2">
<brief_description>
A material that uses a custom [Shader] program
</brief_description>
<description>
A material that uses a custom [Shader] program to render either items to screen or process particles. You can create multiple materials for the same shader but configure different values for the uniforms defined in the shader.
</description>
<tutorials>
</tutorials>
@ -15,6 +17,7 @@
<argument index="0" name="param" type="String">
</argument>
<description>
Returns the current value set for this material of a uniform in the shader
</description>
</method>
<method name="set_shader_param">
@ -25,11 +28,13 @@
<argument index="1" name="value" type="Variant">
</argument>
<description>
Changes the value set for this material of a uniform in the shader
</description>
</method>
</methods>
<members>
<member name="shader" type="Shader" setter="set_shader" getter="get_shader">
The [Shader] program used to render this material
</member>
</members>
<constants>