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...
VisualShaderNodeUVFunc¶
继承: VisualShaderNode < Resource < RefCounted < Object
包含一些用于修改纹理坐标(uv
)的函数,在可视化着色器图中使用。
描述¶
UV 函数与 Vector2 函数类似,但这个节点的输入端口默认使用着色器的 UV 值。
属性¶
|
枚举¶
enum Function:
Function FUNC_PANNING = 0
使用 scale
和 offset
值对 uv
进行平移,使用的公式如下:uv = uv + offset * scale
。uv
端口默认连接至内置的 UV
。
Function FUNC_SCALING = 1
使用 scale
和 pivot
值对 uv
进行缩放,使用的公式如下:uv = (uv - pivot) * scale + pivot
。uv
端口默认连接至内置的 UV
。
Function FUNC_MAX = 2
代表 Function 枚举的大小。
属性说明¶
Function function = 0
要对纹理坐标应用的函数。选项见 Function。