Skip to content
0.2.0-dev Download ZIP
17 lines ·1.1 KB Raw
1<?xml version="1.0" encoding="UTF-8" ?>
2<class name="ShaderInclude" inherits="Resource" api_type="core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
3 <brief_description>
4 A snippet of shader code to be included in a [Shader] with [code]#include[/code].
5 </brief_description>
6 <description>
7 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.
8 </description>
9 <tutorials>
10 <link title="Shader preprocessor">$DOCS_URL/tutorials/shaders/shader_reference/shader_preprocessor.html</link>
11 </tutorials>
12 <members>
13 <member name="code" type="String" setter="set_code" getter="get_code" default="&quot;&quot;">
14 Returns the code of the shader include file. The returned text is what the user has written, not the full generated code used internally.
15 </member>
16 </members>
17</class>