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...
RDShaderFile
繼承: Resource < RefCounted < Object
編譯後的 SPIR-V 形式的著色器檔(由 RenderingDevice 使用)。請勿與 Godot 自身的 Shader 混淆。
說明
編譯後的 SPIR-V 形式的著色器檔。
另見 RDShaderSource。RDShaderFile 應該僅用於 RenderingDevice API。不應與 Godot 自身的 Shader 資源混淆,後者是 Godot 諸多節點所使用的資源,用於高階著色器程式設計。
屬性
|
方法
get_spirv(version: StringName = &"") const |
|
get_version_list() const |
|
void |
set_bytecode(bytecode: RDShaderSPIRV, version: StringName = &"") |
屬性說明
基礎編譯錯誤消息,如果非空,表示與特定著色器階段無關的錯誤。如果為空,著色器編譯也不一定成功(請檢查 RDShaderSPIRV 的各種錯誤消息成員)。
方法說明
RDShaderSPIRV get_spirv(version: StringName = &"") const 🔗
返回指定著色器版本 version 的 SPIR-V 中間表示。
Array[StringName] get_version_list() const 🔗
返回該著色器的編譯版本列表。
void set_bytecode(bytecode: RDShaderSPIRV, version: StringName = &"") 🔗
設定指定著色器版本 version 要編譯的 SPIR-V 位元組碼 bytecode。