Convolute3Filter

class Convolute3Filter(var kernel: Matrix4, dist: Double = 1.0, applyAlpha: Boolean = false) : ShaderFilter

A Filter that will convolute near pixels (3x3) with a kernel. https://en.wikipedia.org/wiki/Kernel_(image_processing)

Constructors

Link copied to clipboard
constructor(kernel: Matrix4, dist: Double = 1.0, applyAlpha: Boolean = false)

Types

Link copied to clipboard
Link copied to clipboard

Properties

Link copied to clipboard
Link copied to clipboard

Whether or not kernel must be applied to the alpha component

Link copied to clipboard

Distance between the origin pixel for sampling for edges

Link copied to clipboard
open override var filtering: Boolean
Link copied to clipboard
Link copied to clipboard

3x3 matrix representing a convolution kernel

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

3x3 matrix representing a convolution kernel

Functions

Link copied to clipboard
open override fun computeBorder(texWidth: Int, texHeight: Int): MarginInt

The number of pixels the passed texture should be bigger at each direction: left, right, top, left.

Link copied to clipboard
fun Filter.getBorder(texWidth: Int, texHeight: Int): MarginInt
Link copied to clipboard
open override fun render(ctx: RenderContext, matrix: Matrix, texture: Texture, texWidth: Int, texHeight: Int, renderColorMul: RGBA, blendMode: BlendMode, filterScale: Double)

The method in charge of rendering the texture transformed using ctx and matrix. The method receives a texture that should be the original image with computeBorder additional pixels on each side.

Link copied to clipboard
fun Filter.renderToTextureWithBorder(ctx: RenderContext, matrix: Matrix, texture: Texture, texWidth: Int, texHeight: Int, filterScale: Double, block: (Texture, matrix: Matrix) -> Unit)
Link copied to clipboard
fun Filter.renderToTextureWithBorderUnsafe(ctx: RenderContext, matrix: Matrix, texture: Texture, texWidth: Int, texHeight: Int, filterScale: Double, result: RenderToTextureResult = RenderToTextureResult()): RenderToTextureResult