Ready-to-use GPU-based visual effects or filters. Most include orx-parameters annotations so they can be easily controlled via orx-gui.
The provided filters are based on OPENRNDR's
Filter
class
All filters provided by orx-fx assume pre-multiplied alpha inputs, which is OPENRNDR's default.
Here's a (potentially incomplete) list of the effects provided by orx-fx. Explore the source for an up-to-date list.
FXAA
, fast approximate anti-aliasing.
Blend filters take two inputs ("source" and "destination"), they are intended to be used in orx-compositor
's layer blend. All blend filters are opacity preserving.
ColorBurn
ColorDodge
Darken
HardLight
Lighten
Multiply
Normal
Overlay
Screen
Add
, add source and destination inputsSubtract
, substract destination color from source color
SourceIn
, Porter-Duff source-in blend, intersect source and destination opacity and keep source colorsSourceOut
, Porter-Duff source-out blend, subtract destination from source opacity and keep source colorsSourceAtop
, Porter-Duff source-atop blend, uses destination opacity, layers source on top and keeps both colorsDestinationIn
, Porter-Duff destination-in blend, intersect source and destination opacity and keep source colorsDestinationOut
, Porter-Duff destination-out blend, subtract destination from source opacity and keep destination colorsDestinationAtop
, Porter-Duff destination-atop blend, uses source opacity, layers destination on top and keeps both colorsXor
, Porter-Duff xor blend, picks colors from input with highest opacity or none with opacities are equal
Passthrough
, pass source color and opacity.
Most blur effects are opacity preserving
ApproximateGaussianBlur
, a somewhat faster but less precise implementation ofGaussianBlur
Bloom
, a multi-pass bloom/glow effectBoxBlur
, a simple but fast box blurFrameBlur
GaussianBlur
, a slow but precise Gaussian blurHashBlur
, a noisy blur effectLaserBlur
LineBlur
MipBloom
ZoomBlur
, a directional blur with a zooming effect
ChromaticAberration
, a chromatic aberration effect based on RGB color separationColorCorrection
, corrections for brightness, contrast, saturation and hueColorLookup
, Color LUT filterColorMix
, filter implementation of OPENRNDR's color matrix mixingDuotone
, maps luminosity to two colors, very similar toLumaMap
but uses LAB color interpolation.DuotoneGradient
, a two-point gradient version ofDuotone
Invert
LumaMap
, maps luminosity to two colorsLumaOpacity
, maps luminosity to opacity but retains source colorLumaThreshold
, applies a treshold on the input luminosity and maps to two colorsPosterize
, a posterize effectSepia
, applies a reddish-brown monochrome tint that imitates an old photographSetBackground
SubtractConstant
, subtract a constant color from the source color
OkLabToRgb
RgbToOkLab
All distortion effects are opacity preserving
BlockRepeat
- repeats a single configurable block of the source inputDisplaceBlend
Fisheye
FluidDistort
Lenses
HorizontalWave
- applies a horizontal wave effect on the source inputVerticalWave
- applies a vertical wave effect on the source inputPerspectivePlane
- applies a planar perspective distortion on the source inputPerturb
PolarToRectangular
RectangularToPolar
StackRepeat
- repeats the source input in a stack fashionStretchWaves
TapeNoise
Tiles
VideoGlitch
ADither
- a selection of dithering effectsCMYKHalftone
- a configurable CMYK halftoning effectCrosshatch
- crosshatching effectLumaHalftone
- a halftoning effect based on luminosity
LumaSobel
- A Sobel-kernel based luminosity edge detectorEdgesWork
- An edges filter doubling as erosionContour
- detects multi-level contours- New:
CannyEdgeDetector
FilmGrain
- adds film-like grain to the source input
DropShadow
- adds a drop shadow based on the opacity in the input image
Uncharted2Tonemap
- implements the Uncharted2 tonemapper
FlipVertically
- flips the source input vertically.
The Post
extension provides an easy way to apply filters to your drawings. Allocating
and resizing color buffers is all taken care of by Post
.
To get additional intermediate color buffers one can access intermediate[x]
fun main() = application {
configure {
windowResizable = true
}
program {
extend(Post()) {
val blur = ApproximateGaussianBlur()
val add = Add()
post { input, output ->
blur.window = 50
blur.sigma = 50.0
blur.apply(input, intermediate[0])
add.apply(arrayOf(input, intermediate[0]), output)
}
}
extend {
drawer.circle(width / 2.0, height / 2.0, 100.0)
}
}
}
Colormap filters operate only on the RED color channel. For example depth maps from orx-depth-camera.
They allow selection of min
/ max
value range and applying exponential
shaping curve
within this range:
GrayscaleColormap
- maps to gray tonesSpectralZucconiColormap
- maps to natural light dispersion spectrum as described by Alan Zucconi in the Improving the Rainbow article.TurboColormap
- maps to Turbo Colormap according to Turbo, An Improved Rainbow Colormap for Visualization by Google.