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.

VisualShaderNodeUVFunc

繼承: VisualShaderNode < Resource < RefCounted < Object

包含一些用於修改紋理座標(uv)的函式,在視覺化著色器圖中使用。

說明

UV 函式與 Vector2 函式類似,但這個節點的輸入埠預設使用著色器的 UV 值。

屬性

Function

function

0


列舉

enum Function: 🔗

Function FUNC_PANNING = 0

使用 scaleoffset 值對 uv 進行平移,使用的公式如下:uv = uv + offset * scaleuv 端口預設連接至內建的 UV

Function FUNC_SCALING = 1

使用 scalepivot 值對 uv 進行縮放,使用的公式如下:uv = (uv - pivot) * scale + pivotuv 埠預設連接至內建的 UV

Function FUNC_MAX = 2

代表 Function 列舉的大小。


屬性說明

Function function = 0 🔗

A function to be applied to the texture coordinates.