Filter4to1

open class Filter4to1(shader: Shader? = null, watcher: ShaderWatcher? = null) : Filter(source)

A specialized filter that combines four input color buffers into one output color buffer.

This filter processes four input color buffers simultaneously and outputs the result into a specified target color buffer. It optionally accepts a clipping rectangle to define the area of processing.

Parameters

shader

The shader used for processing, can be null.

watcher

The shader watcher that monitors shader changes, can be null.

Constructors

Link copied to clipboard
constructor(shader: Shader? = null, watcher: ShaderWatcher? = null)

Creates an instance of Filter4to1 with an optional shader and shader watcher.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

parameter map

Functions

Link copied to clipboard
open fun apply(source: Array<ColorBuffer>, target: Array<ColorBuffer>, clip: Rectangle? = null)

Applies a filter operation using the given source and target arrays of ColorBuffer. Optionally, a clipping rectangle can be used to define the region for the filter operation.

fun apply(source: Array<ColorBuffer>, target: ColorBuffer, clip: Rectangle? = null)

Applies a filter operation using the given source array of ColorBuffer and the target ColorBuffer. Optionally, a clipping rectangle can be used to define the region for the filter operation.

fun apply(source: Array<ColorBuffer>, target: RenderTarget, clip: Rectangle? = null)

Applies a filter operation using the given source and target using a shader program. Optionally, a clipping rectangle can be used to define the region for the filter operation. Custom shader parameters are applied where applicable.

fun apply(source: ColorBuffer, target: Array<ColorBuffer>, clip: Rectangle? = null)

Applies a filter operation using the given source ColorBuffer and target array of ColorBuffer. Optionally, a clipping rectangle can be used to define the region for the filter operation.

fun apply(source: ColorBuffer, target: ColorBuffer, clip: Rectangle? = null)

fun apply(source0: ColorBuffer, source1: ColorBuffer, source2: ColorBuffer, source3: ColorBuffer, target: ColorBuffer, clip: Rectangle? = null)

Applies a filter that processes four source color buffers and outputs the result to a target color buffer. Optionally, a clipping rectangle can be provided to specify the area of processing.

Link copied to clipboard
open override fun close()
Link copied to clipboard
open fun destroy()

Releases resources associated with this filter, including those allocated for the shader. This method should be called when the filter is no longer needed to ensure proper cleanup and avoid resource leaks.

Link copied to clipboard
fun untrack()