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.

CurveXYZTexture

繼承: Texture2D < Texture < Resource < RefCounted < Object

一維紋理,其中紅色、綠色和藍色通道分別對應 3 條曲線上的點。

說明

一維紋理,紅、綠、藍通道分別對應 3 條單位 Curve 資源上的點。與使用單獨的 CurveTexture 相比,可以簡化將曲線儲存為影像檔案的任務。

如果你只需要在單張紋理中儲存一條曲線,請改用 CurveTexture。另見 GradientTexture1D 和 GradientTexture2D。

屬性

Curve

curve_x

Curve

curve_y

Curve

curve_z

bool

resource_local_to_scene

false (overrides Resource)

int

width

256


屬性說明

Curve curve_x 🔗

  • void set_curve_x(value: Curve)

  • Curve get_curve_x()

渲染到該紋理紅色通道上的 Curve。應當為單位 Curve。


Curve curve_y 🔗

  • void set_curve_y(value: Curve)

  • Curve get_curve_y()

渲染到該紋理綠色通道上的 Curve。應當為單位 Curve。


Curve curve_z 🔗

  • void set_curve_z(value: Curve)

  • Curve get_curve_z()

渲染到該紋理藍色通道上的 Curve。應當為單位 Curve。


int width = 256 🔗

  • void set_width(value: int)

  • int get_width()

紋理寬度(單位為圖元)。較大的值能夠更好地表示高頻資料(例如方向的突變),但會增加生成時間和記憶體佔用。