ComputeShaderEffect
Inherits: CompositorEffect
Allows using a compute shader to create a custom rendering effect.
Description
This resource defines a custom rendering effect backed by a ComputeShaderFile.
Properties
Methods
void |
_bind_view(task: ComputeShaderTask, kernel: ComputeShaderKernel, render_data: |
void |
queue_dispatch(kernel_name: |
Signals
view_dispatching(view: int) 🔗
Called right before a view is dispatched. In VR, this will typically be called twice (once for each eye).
Property Descriptions
ComputeShaderTask task 🔗
void set_task(value: ComputeShaderTask)
ComputeShaderTask get_task()
The task associated with this texture.
Method Descriptions
void _bind_view(task: ComputeShaderTask, kernel: ComputeShaderKernel, render_data: RenderData, view: int) virtual 🔗
Called before a view is rendered. Shader parameters that are updated every frame should be set during this callback.
void queue_dispatch(kernel_name: String) 🔗
Queues the specified kernel to be dispatched during the next frame render.
By default, kernels are dispatched every frame, so only call this if you have explicitly declared otherwise in your shader using [gd::compositor::Skip] or [gd::compositor::Once].