RDShaderFile
继承: Resource
< RefCounted
< Object
Compiled shader file in SPIR-V form (used by RenderingDevice
). Not to be confused with Godot's own Shader
.
描述
Compiled shader file in SPIR-V form.
See also RDShaderSource
. RDShaderFile is only meant to be used with the RenderingDevice
API. It should not be confused with Godot's own Shader
resource, which is what Godot's various nodes use for high-level shader programming.
属性
方法
RDShaderSPIRV | get_spirv ( version: StringName = &"" ) const1 |
Array StringName | get_version_list ( ) const1 |
void | set_bytecode ( bytecode: RDShaderSPIRV , version: StringName = &"" ) |
属性说明
String
base_error = ""
The base compilation error message, which indicates errors not related to a specific shader stage if non-empty. If empty, shader compilation is not necessarily successful (check RDShaderSPIRV
's error message members).
方法说明
RDShaderSPIRV
get_spirv ( version: StringName
= &"" ) const1
Returns the SPIR-V intermediate representation for the specified shader version
.
Array StringName
get_version_list ( ) const1
Returns the list of compiled versions for this shader.
void
set_bytecode ( bytecode: RDShaderSPIRV
, version: StringName
= &"" )
Sets the SPIR-V bytecode
that will be compiled for the specified version
.
本方法通常需要用户覆盖才能生效。
本方法无副作用,不会修改该实例的任何成员变量。
本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。
本方法用于构造某个类型。
调用本方法无需实例,可直接使用类名进行调用。
本方法描述的是使用本类型作为左操作数的有效运算符。
这个值是由下列位标志构成位掩码的整数。
无返回值。