summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMewPurPur <mew.pur.pur@abv.bg>2023-06-22 16:06:20 +0200
committerMewPurPur <mew.pur.pur@abv.bg>2023-06-22 18:25:21 +0200
commitda84efc96d81e19deddb801eafc92a6295be5eba (patch)
tree29d73fa4f156cbc5921397b0e2c06e9dbb73b5c9
parentada712e06a471da2a2f4646237830bbd7980c114 (diff)
downloadredot-engine-da84efc96d81e19deddb801eafc92a6295be5eba.tar.gz
Document ShaderInclude
-rw-r--r--doc/classes/ShaderInclude.xml4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/classes/ShaderInclude.xml b/doc/classes/ShaderInclude.xml
index f8ffe2d972..28537ef9bb 100644
--- a/doc/classes/ShaderInclude.xml
+++ b/doc/classes/ShaderInclude.xml
@@ -1,13 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ShaderInclude" inherits="Resource" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ A snippet of shader code to be included in a [Shader] with [code]#include[/code].
</brief_description>
<description>
+ A shader include file, saved with the [code].gdshaderinc[/code] extension. This class allows you to define a custom shader snippet that can be included in a [Shader] by using the preprocessor directive [code]#include[/code], followed by the file path (e.g. [code]#include "res://shader_lib.gdshaderinc"[/code]). The snippet doesn't have to be a valid shader on its own.
</description>
<tutorials>
+ <link title="Shader preprocessor">$DOCS_URL/tutorials/shaders/shader_reference/shader_preprocessor.html</link>
</tutorials>
<members>
<member name="code" type="String" setter="set_code" getter="get_code" default="&quot;&quot;">
+ Returns the code of the shader include file. The returned text is what the user has written, not the full generated code used internally.
</member>
</members>
</class>