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.

VisualShaderNodeFloatFunc

繼承: VisualShaderNode < Resource < RefCounted < Object

在視覺化著色器圖中使用的浮點數標量函式。

說明

在輸入埠接受一個浮點數標量(x)並根據 function 對其進行變換。

屬性

Function

function

13


列舉

enum Function: 🔗

Function FUNC_SIN = 0

返回參數的正弦值。在 Godot 著色器語言中,會被翻譯為 sin(x)

Function FUNC_COS = 1

返回參數的餘弦值。在 Godot 著色器語言中,會被翻譯為 cos(x)

Function FUNC_TAN = 2

返回參數的正切值。在 Godot 著色器語言中,會被翻譯為 tan(x)

Function FUNC_ASIN = 3

返回參數的反正弦值。在 Godot 著色器語言中,會被翻譯為 asin(x)

Function FUNC_ACOS = 4

返回參數的反餘弦值。在 Godot 著色器語言中,會被翻譯為 acos(x)

Function FUNC_ATAN = 5

返回參數的反正切值。在 Godot 著色器語言中,會被翻譯為 atan(x)

Function FUNC_SINH = 6

返回參數的雙曲正弦值。在 Godot 著色器語言中,會被翻譯為 sinh(x)

Function FUNC_COSH = 7

返回參數的雙曲餘弦值。在 Godot 著色器語言中,會被翻譯為 cosh(x)

Function FUNC_TANH = 8

返回參數的雙曲正切值。在 Godot 著色器語言中,會被翻譯為 tanh(x)

Function FUNC_LOG = 9

返回參數的自然對數。在 Godot 著色器語言中,會被翻譯為 log(x)

Function FUNC_EXP = 10

返回該參數的自然指數。在 Godot 著色器語言中,會被翻譯為 exp(x)

Function FUNC_SQRT = 11

返回參數的平方根。在 Godot 著色器語言中,會被翻譯為 sqrt(x)

Function FUNC_ABS = 12

返回參數的絕對值。在 Godot 著色器語言中,會被翻譯為 abs(x)

Function FUNC_SIGN = 13

提取參數的符號。在 Godot 著色器語言中,會被翻譯為 sign(x)

Function FUNC_FLOOR = 14

搜尋小於或等於參數的最接近的整數。在 Godot 著色器語言中,會被翻譯為 floor(x)

Function FUNC_ROUND = 15

搜尋最接近參數的整數。在 Godot 著色器語言中,會被翻譯為 round(x)

Function FUNC_CEIL = 16

搜尋大於或等於參數的最接近的整數。在 Godot 著色器語言中,會被翻譯為 ceil(x)

Function FUNC_FRACT = 17

計算參數的小數部分。在 Godot 著色器語言中,會被翻譯為 fract(x)

Function FUNC_SATURATE = 18

使用 min(max(x, 0.0), 1.0) 將值鉗制在 0.01.0 之間。

Function FUNC_NEGATE = 19

使用 -(x),對 x 求反。

Function FUNC_ACOSH = 20

返回參數的反雙曲餘弦值。在 Godot 著色器語言中,會被翻譯為 acosh(x)

Function FUNC_ASINH = 21

返回參數的反雙曲正弦值。在 Godot 著色器語言中,會被翻譯為 asinh(x)

Function FUNC_ATANH = 22

返回參數的反雙曲正切值。在 Godot 著色器語言中,會被翻譯為 atanh(x)

Function FUNC_DEGREES = 23

將弧度數轉換為度數。在 Godot 著色器語言中,會被翻譯為 degrees(x)

Function FUNC_EXP2 = 24

返回 2 的參數次冪。在 Godot 著色器語言中,會被翻譯為 exp2(x)

Function FUNC_INVERSE_SQRT = 25

返回參數平方根的倒數。在 Godot 著色器語言中,會被翻譯為 inversesqrt(x)

Function FUNC_LOG2 = 26

返回參數的以 2 為底的對數。在 Godot 著色器語言中,會被翻譯為 log2(x)

Function FUNC_RADIANS = 27

將度數轉換為弧度。在 Godot 著色器語言中,會被翻譯為 radians(x)

Function FUNC_RECIPROCAL = 28

求 1 除以 x 得到的倒數(即 1 / x)。

Function FUNC_ROUNDEVEN = 29

搜尋最接近參數的偶數。在 Godot 著色器語言中,會被翻譯為 roundEven(x)

Function FUNC_TRUNC = 30

返回與 x 的最接近整數的值,其絕對值不大於 x 絕對值。在 Godot 著色器語言中,會被翻譯為 trunc(x)

Function FUNC_ONEMINUS = 31

從 1 中減去標量 x(即 1 - x)。

Function FUNC_MAX = 32

代表 Function 列舉的大小。


屬性說明

Function function = 13 🔗

A function to be applied to the scalar.