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.

ShaderInclude

繼承: Resource < RefCounted < Object

著色器程式碼片段,能夠在 Shader 中使用 #include 引入。

說明

著色器標頭檔,保存時使用 .gdshaderinc 副檔名。這個類能夠用於定義自訂著色器程式碼片段,在 Shader 中可以使用前置處理器指令 #include 加上檔路徑引入(例如 #include "res://shader_lib.gdshaderinc")。程式碼片段本身不必是有效的著色器。

教學

屬性

String

code

""


屬性說明

String code = "" 🔗

返回著色器標頭檔的程式碼。返回的文字是使用者所編寫的內容,不是內部使用的完整生成的程式碼。