소스 검색

Merge pull request #78562 from MewPurPur/document-shader-include

Document ShaderInclude
Rémi Verschelde 2 년 전
부모
커밋
522a2ea3f4
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      doc/classes/ShaderInclude.xml

+ 4 - 0
doc/classes/ShaderInclude.xml

@@ -1,13 +1,17 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <?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">
 <class name="ShaderInclude" inherits="Resource" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
 	<brief_description>
 	<brief_description>
+		A snippet of shader code to be included in a [Shader] with [code]#include[/code].
 	</brief_description>
 	</brief_description>
 	<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>
 	</description>
 	<tutorials>
 	<tutorials>
+		<link title="Shader preprocessor">$DOCS_URL/tutorials/shaders/shader_reference/shader_preprocessor.html</link>
 	</tutorials>
 	</tutorials>
 	<members>
 	<members>
 		<member name="code" type="String" setter="set_code" getter="get_code" default="&quot;&quot;">
 		<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>
 		</member>
 	</members>
 	</members>
 </class>
 </class>