ComputeTexture

Experimental: The implementation may change or be removed.

Inherits: Texture2D

Texture backed by a compute shader.

Description

A Texture2D resource backed by a ComputeShaderTask.

Properties

bool

is_animated

false

bool

resource_local_to_scene

false (overrides Resource)

Vector2i

size

Vector2i(256, 256)

ComputeShaderTask

task

Methods

RenderingDevice.DataFormat

get_data_format() const

void

render()

void

set_data_format(p_data_format: RenderingDevice.DataFormat)


Property Descriptions

bool is_animated = false 🔗

  • void set_is_animated(value: bool)

  • bool get_is_animated()

If true, the texture will be rerendered each frame.


Vector2i size = Vector2i(256, 256) 🔗

  • void set_size(value: Vector2i)

  • Vector2i get_size()

The size of the backing texture.


ComputeShaderTask task 🔗

The task associated with this texture.


Method Descriptions

RenderingDevice.DataFormat get_data_format() const 🔗

Get the data format used by the underlying render texture.


void render() 🔗

Dispatch the compute shader and render to the backing texture.


void set_data_format(p_data_format: RenderingDevice.DataFormat) 🔗

Set the data format used by the underlying render texture.