Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
ShaderInclude¶
继承: Resource < RefCounted < Object
着色器代码片段,能够在 Shader 中使用 #include
引入。
描述¶
着色器头文件,保存时使用 .gdshaderinc
扩展名。这个类能够用于定义自定义着色器代码片段,在 Shader 中可以使用预处理器指令 #include
加上文件路径引入(例如 #include "res://shader_lib.gdshaderinc"
)。代码片段本身不必是有效的着色器。
教程¶
属性¶
|
属性说明¶
String code = ""
返回着色器头文件的代码。返回的文本是用户所编写的内容,不是内部使用的完整生成的代码。