library
module · ferroui-base · v0.5.0
module library
The custom effects FerroUI ships (#455, E2 to E6; not from upstream):
- the colour effects of Effector's sample set (tint, grayscale, sepia,
saturation, brightness and contrast, invert), its glow, and the image
effects sharpen and edge detect (convolutions, E3), as values of
CustomEffectthat describe themselves as effect graphs (CustomEffect::graph), so that every backend draws them on the GPU with the painter of the composition effects; - its pixelation, scan lines, grid and spotlight as runtime shader effects
(
CustomEffect::shader): SkSL drawn by Skia on every surface, WGSL for Vello (drawn from step E5 on) (docs/porting/custom-effects.md); - two page transitions as runtime shader effects that sample images (E6): its dissolve, and a reveal through a mask;
- its interactive shader effects (E7): the pointer spotlight, the
reactive grid, the water ripple and the burning flame, each a runtime
shader effect and an interactive effect class that changes it from the
pointer input of its host (
IEffectInputHandler).
They are registered with CustomEffectRegistry the first time the
registry is used (register_library_effects), so that effect strings
and markup name them: Effect="tint(color=#0F9D8E, strength=0.55)".
Each has a CPU reference (CustomEffect::cpu_reference), the function
the render tests compare the backends with.
The names of the types are those of Effector's classes; the composition
effect descriptions with the names of Win2D's classes (TintEffect,
SepiaEffect, ...) are other types, in
rendering::composition::effects.
Contents
BurningFlameShaderEffect— structInteractiveBurningFlameEffect— structInteractivePointerSpotlightEffect— structInteractiveReactiveGridEffect— structInteractiveWaterRippleEffect— structPointerSpotlightShaderEffect— structReactiveGridShaderEffect— structRippleWave— structWaterRippleShaderEffect— structGridShaderEffect— structPixelateEffect— structScanlineShaderEffect— structSpotlightShaderEffect— structDissolveTransitionEffect— structMaskTransitionEffect— structregister_library_effects— functionTintEffect— structGrayscaleEffect— structSepiaEffect— structSaturationEffect— structBrightnessContrastEffect— structInvertEffect— structGlowEffect— structSharpenEffect— structEdgeDetectEffect— struct
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.