Package-level declarations
Types
Moves, rotates and scales the image around pivot: the image is scaled by scale, rotated by rotation degrees and moved by translation
The layer of a EffectStage.Blend
A blend: a function vec4 blend(vec4 base, vec4 layer) that combines a layer color with a base color
the colormaps of Colormap
A color operation: a function vec4 color(vec4 c, vec2 uv) that maps the color c at texture coordinate uv to a new color. The operations below change the rgb channels as they are stored and keep alpha.
The same value for every pixel
The same value for every pixel
the masks of Dither
Maps the luma of the colors from background to foreground, interpolated in OKLab when labInterpolation
A filter that applies stages in order. Consecutive warp, color, source and blend stages are fused into a single pass that reads the input once, filter stages run as passes of their own. A blend stage with the input of the chain as its layer reads the input in whatever pass it is fused into. A source stage replaces the image, the stages before it have no effect. A sample stage reads the image as it is after the stages before it, it starts a pass that reads the input with the sampler. The result is that of applying the stages one after another, without resampling between fused stages.
Builds the stages of an EffectChain
A stage of an EffectChain
Film grain, which changes rate times per second with the time of the context, fx_time(), see fxContextLibrary; strength and pitch set the strength and size of the grain, liftRatio mixes multiplied grain (0) with added grain (1). Colored grain is desaturated by colorLevel. The grain is aligned to the pixels of the output. Like every preset that reads the context, it is for effect chains, preset filters and shaders that set the context, see setFxContext.
The GLSL signature a preset slot accepts: a function returning returnType that takes argumentTypes, or, without argument types, a value of returnType such as a GLSL parameter or a texture parameter.
Color grading: exposure in stops, contrast around mid gray, saturation around the luma and gamma
the color space that the colors of a gradient are interpolated in
what a gradient does beyond its first and last stop
Inverts the colors, by amount
1 minus mask
the blend modes of LayerBlend
A halftone of the luma: black where the luma times a pattern of cosine lines is below threshold, white elsewhere, or the other way around when invert. The pattern, lines at freq0 with a cosine wobble of freq1 and gain1, turned by rotation degrees, is antialiased by sampling it 7 by 7 times per pixel.
foreground where the luma is at least threshold, background elsewhere
A mask: a function float mask(vec2 uv) from 0 to 1 of a texture coordinate. Unlike a ScalarPreset, which is read at the pixel itself, a mask is read at the coordinate it is given, so warps before it move it.
A filter of several passes, each a shade style, with preset slots that every pass reads: like a separable blur, of which both passes read the radius. Make the slots with slot, apply the passes with applyPass, and keep the images between passes in intermediates. The fragment transforms of the passes end with FX_CONTEXT_USE, so that the presets in the slots can read fxContextLibrary.
Displaces coordinates by fractal simplex noise, with octaves octaves that each scale by lacunarity and are weighted by decay. The noise is sampled on a circle of radius in the third dimension, phase moves along it, which loops for phases that differ by 2.
how a paint in PaintUnits.BOUNDS units fits bounds that are not square
A paint of a PaintStyle: source read at coordinates in units, transformed by the inverse of transform. In PaintUnits.BOUNDS units fit keeps the aspect ratio of the paint in bounds that are not square, before the transform; for other units it does nothing, put it in the transform.
A shade style that paints the fills and strokes of shapes with sources, such as gradients: the color of the source replaces the color of the fill or stroke, their alpha multiplies. A fill or stroke without a paint keeps its color. All PaintUnits work for shapes, contours, circles and rectangles, also drawn in batches.
Builds a PaintStyle
the coordinates that a paint is read at
Reduces every channel to levels levels
A preset: an object with annotated properties that provides a DynamicParameter for a slot with contract. Presets are assigned to the slots of filters, shade styles and other presets, see presetSlot.
A filter with preset slots: presets that vary what it does per pixel, like the radius of a blur. A graph or an EffectChain treats it as a pass of its own, or several, sets its slots, and sets the values of fxContextLibrary before applying it.
A radial gradient, like SVG's radialGradient: offset 0 is the circle at focal with radius focalRadius, offset 1 the circle at center with radius, the circles in between are interpolated
Displaces coordinates along sines: x by the sine of y and y by the sine of x
A sampler: a function vec4 sample(sampler2D image, vec2 uv) that reads an image at and around a texture coordinate. In an EffectChain a sampler reads the image as it is after the stages before it, which takes a pass of its own.
A float that can vary per pixel, for slots that read it as p_<name>
Sepia toning, by amount
The same color everywhere
A source: a function vec4 source(vec2 uv) that generates the color at texture coordinate uv. In an EffectChain a source replaces the image, in a Layer it is blended over the image.
The base of gradients with color stops: the gradient function t of a coordinate picks a color from the stops. The code of the gradient depends on the number of stops, a gradient with another number of stops compiles another shader.
The red channel of texture
The colors of texture, read at texture coordinates: 0..1 covers the texture once, the wrap mode of the texture decides what lies beyond, set it to repeat to tile the texture. The texture holds premultiplied colors, as render targets that are drawn to do, the colors are read without the premultiplication. Replacing the texture does not compile another shader.
The red channel of texture at coordinate, which by default covers what is drawn, or the input of a filter
The red and green channels of texture at coordinate, which by default covers what is drawn, or the input of a filter
A vec2 that can vary per pixel, for slots that read it as p_<name>
A warp: a function vec2 warp(vec2 uv) that maps a coordinate to the coordinate to read from
Properties
GLSL library with the ordered dither masks of orx-fx: float a_dither(int pattern, int levels, float l, ivec2 p, int c) quantizes l to levels levels with the mask pattern (0 to 3) at pixel p for channel c
GLSL library with vec3 bump3y(vec3 x, vec3 yoffset), used by spectralZucconi6Library
GLSL library with the film grain of orx-fx: float film_grain_source(vec3 x, float strength, float pitch)
A GLSL statement for the end of a fragment transform that reads the values of fxContextLibrary without changing the result, so that they are in the shader and can be set when none of its presets read them.
The context of the image an effect makes, for presets that change over time or depend on the size of the image:
GLSL library that converts linear RGB colors to and from the interpolation spaces of GradientInterpolation
GLSL library with conversions between sRGB and OKLab: oklab_srgb_to_linear, oklab_linear_to_srgb, oklab_from_linear and oklab_to_linear, all vec3 f(vec3 c)
GLSL library with 3D simplex noise, float snoise3(vec3 v), which returns values in -1, 1
GLSL library with Alan Zucconi's spectral colormap, vec3 spectral_zucconi6(float x)
vec4 straight(vec4 c): the straight color of c, a premultiplied color as images hold them; filters that read images and write their colors to x_fill need straight colors, the filter premultiplies them when it writes them
GLSL library with the Turbo colormap, vec3 turbo_colormap(float x)
Functions
The transform that maps 0..1 to bounds, which turns a paint in PaintUnits.BOUNDS units into one in PaintUnits.OBJECT units: boundsTransform(shape.bounds) * paintTransform
An EffectChain with the stages that builder adds
A shade style that paints fills and strokes with sources, such as gradients:
true when the code of this parameter can read the values of fxContextLibrary: through its libraries, or through those of the dynamic parameters it has as parameters, like the presets in the slots of a preset, at any depth. The presets as they are now: assigning another preset to a slot can change it.
true when this library is fxContextLibrary or depends on it, directly or through other libraries
true when this preset can read the values of fxContextLibrary, also through the presets in its slots, so that it changes over time even when nothing else does, see DynamicParameter.readsFxContext
true when a preset in one of the slots of this filter can read the values of fxContextLibrary
Sets the values of fxContextLibrary: the time in seconds, the number of the frame and the resolution of the image in pixels. For a shade style or a filter whose shader reads them or includes FX_CONTEXT_USE.