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.

CameraTexture

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

CameraFeed 提供的紋理。

說明

該紋理可以存取 CameraFeed 提供的相機紋理。

注意:許多相機提供的都是 YCbCr 圖像,需要在著色器中進行轉換。

屬性

int

camera_feed_id

0

bool

camera_is_active

false

bool

resource_local_to_scene

false (overrides Resource)

FeedImage

which_feed

0


屬性說明

int camera_feed_id = 0 🔗

  • void set_camera_feed_id(value: int)

  • int get_camera_feed_id()

我們要顯示圖像的 CameraFeed 的 ID。


bool camera_is_active = false 🔗

  • void set_camera_active(value: bool)

  • bool get_camera_active()

給予存取 CameraFeed 的活動屬性的便利屬性。


FeedImage which_feed = 0 🔗

我們要存取 CameraFeed 中的哪個圖像,如果相機圖像被分割成 Y 和 CbCr 分量,這一點很重要。