Reference / Types
Built-in Filters
The maintained filters Raster ships, grouped by job, plus the blend modes the registry includes.
Built-in filters are ordinary MTIFilter implementations backed by render, compute, MPS, or Core Image kernels. They share the lazy image model. Alpha types, output extent, pixel format, and device capabilities still vary by filter. Two built-in filters are not interchangeable just because they share the same protocol.
Color and tone
These filters adjust color matrices, tone curves, transfer functions, lookup tables, and local contrast.
MTIColorMatrixFilterapplies a 4×4 color matrix and bias.MTIVibranceFilteradjusts saturation with skin-tone-aware behavior.MTIRGBToneCurveFilterevaluates per-channel tone curves.MTIRGBColorSpaceConversionFilterconverts among supported RGB transfer functions.- Image conveniences cover saturation, exposure, brightness, contrast, and vibrance adjustments.
MTIColorLookupFilterapplies supported 2D or 3D color lookup representations.MTICLAHEFilterperforms local contrast-limited adaptive histogram equalization and supports explicit HDR headroom.
Blur, detail, and convolution
These filters cover Metal Performance Shaders blurs and edges, plus Raster's own detail and bokeh approximations.
MTIMPSGaussianBlurFilter,MTIMPSBoxBlurFilter, andMTIMPSConvolutionFilteruse Metal Performance Shaders.MTIMPSUnsharpMaskFilter,MTIMPSDefinitionFilter, andMTIMPSSobelFilterprovide detail and edge operations.MTIHexagonalBokehBlurFilterbuilds a multi-pass bokeh approximation.MTIHighPassSkinSmoothingFiltercombines high-pass detail separation with smoothing controls.
MPS-backed filters require context.isMetalPerformanceShadersSupported. Their exact numerical results can vary slightly across GPU families and SDK implementations. Tests that do not treat bit identity as part of the API should use tolerances.
Geometry and shape
These filters change viewport, crop, corners, distortion, and stylized sampling.
MTITransformFilterapplies 2D/3D transforms and controls the output viewport.MTICropFilterselects pixel or normalized regions.MTIRoundCornerFilterclips to circular or continuous corners.MTIBulgeDistortionFilterapplies radial distortion.MTIPixellateFilter,MTIColorHalftoneFilter, andMTIDotScreenFiltercreate stylized sampling patterns.
Alpha and composition
These filters convert alpha representation and combine images through blends, masks, chroma keys, and layer stacks.
MTIPremultiplyAlphaFilterandMTIUnpremultiplyAlphaFilterconvert alpha representation.MTIBlendFiltercombines one source with one background across the registered blend-mode set.MTIBlendWithMaskFiltercontrols a blend through a mask.MTIChromaKeyBlendFilterremoves a keyed color and composites a background.MTIMultilayerCompositingFilterand its SwiftMultilayerCompositingFiltersurface compose ordered layers with transforms, masks, tint, corners, and blend modes.
Histogram and analysis
These filters produce or consume histogram data.
MTIMPSHistogramFilterproduces histogram data through MPS.MTICLAHEFilterbuilds local histograms internally and applies their lookup tables to the image.
Core Image coverage
MTICoreImageUnaryFilter is a bridge that makes the broader CIFilter catalogue available inside a Raster graph. Each Core Image filter still brings its own alpha, extent, and optimization behavior. Generators and infinite-extent filters need a finite output size. Adjacent Core Image work can stay in Core Image until the result returns to Raster.
Blend modes
The built-in registry contains:
- normal
- darken, multiply, color burn, linear burn, and darker color
- lighten, screen, color dodge, add, and lighter color
- overlay, soft light, hard light, vivid light, linear light, pin light, and hard mix
- difference, exclusion, subtract, and divide
- hue, saturation, color, and luminosity
- the 512×512 color-lookup mode
Custom modes can be registered with MTIBlendFunctionDescriptors. Their blend function is the two-argument float4 blend(float4 backdrop, float4 source).