Skip to main content

Crate alpha2_shaders

Crate alpha2_shaders 

Source
Expand description

Reusable shader assets for the alpha2 render pipeline.

  • shaders/build/*.wesl are complete modules, flattened to WGSL by build.rs.
  • shaders/runtime/**/*.wgsl are effect bodies, not valid on their own: alpha2-render prepends a preamble generated from each effect’s parameter schema at runtime.

Constants§

ADVANCED_MOSAIC
Center-anchored growing mosaic transition body.
ALPHA_ADJUST
Built-in alpha levels body.
ANGULAR
Angular sweep transition body.
BLACK_AND_WHITE
Built-in black-and-white channel mixer body.
BLOCK_DISSOLVE
Per-block random dissolve transition body.
BOOK_FLIP
Book page turn transition body.
BOUNCE
Picture dropping away with bounces and a contact shadow transition body.
BOW_TIE
Bow-tie wipe with an adjustable tip transition body.
BOW_TIE_HORIZONTAL
Horizontal bow-tie wipe transition body.
BOW_TIE_VERTICAL
Vertical bow-tie wipe transition body.
BOX
Box opening from the center or a corner, or closing onto it, transition body.
BULGE
Built-in bulge body.
BURN
Hot flash cross-fade transition body.
BURN_NOISE
Noise burn-away transition body.
BUTTERFLY_WAVE_SCRAWLER
Chromatic butterfly-wave transition body.
CANVAS_PRESENT_WGSL
Full-screen triangle drawing a rendered frame onto a browser canvas.
CHANNEL_MIXER
Built-in channel mixer body.
CHESSBOARD
Checkerboard wipe transition body.
CHROMA_KEY_BODY
Author body for the built-in chroma-key effect.
CIRCLE
Circle-through-background transition body.
CIRCLE_CROP
Aspect-correct circular crop transition body.
CIRCLE_OPEN
Circular opening or closing transition body.
COLOR_CONTROLS
Built-in exposure, contrast, saturation, temperature, and tint body.
COLOR_ISOLATE
Built-in color isolate (one hue kept) body.
COLOR_PHASE
Per-channel phased color transition body.
COLOUR_DISTANCE
Color-distance reveal transition body.
COMPOSITE_WGSL
Transform and blend one premultiplied RGBA layer over a backdrop.
CORNER_PIN
Built-in corner pin body.
COVER
Incoming picture sliding over the outgoing one transition body.
CRAZY_PARAMETRIC_FUN
Parametric-curve swirl transition body.
CROP
Built-in crop body.
CROSSHATCH
Scratchy radial reveal transition body.
CROSS_WARP
Cross-warp transition body.
CRT
Built-in crt body: a curved screen with scanlines and an aperture mask.
CUBE
Rotating cube transition body, with a floor reflection.
DEFOCUS_BLUR
Defocus-blur cross-fade transition body.
DIRECTIONAL
Directional slide transition body.
DIRECTIONAL_EASING
Eased directional push transition body.
DIRECTIONAL_SCALED
Directional push that shrinks both pictures mid-way transition body.
DIRECTIONAL_WARP
Directional warp transition body.
DIRECTIONAL_WIPE
Soft directional wipe transition body.
DISPLACEMENT_MAP
Built-in displacement map body.
DOORWAY
Doors opening onto the incoming picture transition body.
DREAMY
Dreamy vertical-warp transition body.
DREAMY_ZOOM
Rotating zoom through a white flash transition body.
DROP_ZONE_FLICKER
Flickering block glitch transition body.
DUOTONE
Built-in two-color duotone body.
EDGE
Edge-detect flash transition body.
EDGE_DETECT
Built-in edge-detect body: Sobel gradients.
EFFECT_HELPERS
Color, noise and coordinate helpers shared by the built-in effect bodies.
EMBOSS
Built-in emboss body: relief from a luminance difference.
EXPANDED_EFFECT
Body of a public effect the render graph expands into internal passes.
FADE
Cross-fade transition body.
FADE_COLOR
Fade-through-color transition body.
FADE_GRAYSCALE
Fade-through-grayscale transition body.
FILL
Built-in color fill body.
FILM_BURN
Film burn and light leak transition body.
FILM_GRAIN
Built-in procedural film-grain body.
FLY_EYE
Compound-eye lens transition body.
FOCUS_COMBINE
Tilt-shift’s last pass: the source and two blurs mixed by the distance from a band.
FOLD
Squash push transition body.
FRAGMENT
Voronoi shards flying away transition body.
FULLSCREEN_TEXTURE_QUAD_WGSL
Full-screen triangle copying a premultiplied-alpha texel.
GAUSSIAN_BLUR
Author body for one axis pass of the built-in Gaussian blur cascade.
GLITCH
Row jumps and channel splits transition body.
GLITCH_DISPLACE
Color-driven displacement glitch transition body.
GLITCH_EFFECT
Built-in glitch effect body: rows of blocks jumping sideways over time.
GLOW_COMBINE
Glow’s last pass: the source with its blurred bloom added.
GLOW_THRESHOLD
Glow’s first pass: the straight color above its threshold.
GL_TRANSITION_ENTRY
The entry point and samplers that run a gl-transitions port in its bottom-left uv.
GRADIENT_MAP
Built-in three-color gradient map body.
GRADIENT_WIPE
Wipe along a procedural gradient transition body.
GRID_FLIP
Grid of flipping tiles transition body.
HALFTONE
Built-in halftone body: a rotated grid of dots.
HEART
Heart-shaped reveal transition body.
HEXAGONALIZE
Hexagonal pixelation transition body.
HORIZONTAL_CLOSE
Barn doors closing horizontally transition body.
HORIZONTAL_OPEN
Barn doors opening horizontally transition body.
HSV_FADE
Cross-fade through hue, saturation and value transition body.
HUE_SATURATION
Built-in hue, saturation, and lightness body.
INVERT
Built-in invert body.
KALEIDOSCOPE
Kaleidoscope cross-fade transition body.
KALEIDOSCOPE_EFFECT
Built-in kaleidoscope body.
LEFT_RIGHT
Slide in from the right over a receding picture transition body.
LENS_BLUR
Built-in disc (bokeh) blur body.
LENS_DISTORTION
Built-in lens distortion body.
LETTERBOX
Built-in letterbox body: opaque bars around a window of a given aspect.
LEVELS
Built-in levels body.
LIFT_GAMMA_GAIN
Built-in lift, gamma, and gain body.
LIGHT_LEAK
Built-in light-leak body: drifting blobs of light screened over the picture.
LINEAR_BLUR
Box-blur cross-fade transition body.
LUMA_BURN
Luma-threshold burn transition body.
LUMA_KEY
Built-in luma-key body.
LUMINANCE_MELT
Luminance melt transition body.
LUT_3D_BODY
Author body for the built-in resource-backed 3D LUT effect.
MATTE_CHOKER
Built-in matte erode and dilate body.
MIRROR
Built-in mirror body.
MORPH
Color-driven morph transition body.
MOSAIC_TILES
Zoom over a wall of turned tiles transition body.
MULTIPLY_BLEND
Cross-fade through the two pictures’ product transition body.
OFFSET
Built-in offset body.
OIL_PAINT
Built-in oil-paint body: a Kuwahara filter, its quadrants weighted.
OLD_TV_LOST_SIGNAL
Lost TV signal tracking lines transition body.
OUTLINE
Built-in outline body: an outer stroke from ring taps.
OVEREXPOSURE
Overexposed flash cross-fade transition body.
PAGE_PEEL
Page curling away transition body.
PARAMETRIC_GLITCH
Color-driven spiral glitch transition body.
PERLIN
Value-noise dissolve transition body.
PINWHEEL
Rotating pinwheel transition body.
PIXELATE_EFFECT
Built-in pixelation body.
PIXELIZE
Pixelated cross-fade transition body.
POLAR_COORDINATES
Built-in polar coordinates body.
POLAR_FUNCTION
Flower-shaped iris transition body.
POLKA_DOTS_CURTAIN
Polka-dot curtain transition body.
POSTERIZE
Built-in posterize body.
POWER_KALEIDO
Spinning kaleidoscope zoom transition body.
RADIAL
Radial sweep transition body.
RADIAL_BLUR
Built-in zoom and spin blur body.
RANDOM_NOISE
Per-pixel random dissolve transition body.
RANDOM_SQUARES
Random-squares dissolve transition body.
READBACK_PACK_WGSL
GPU quantization from float intermediates into an RGBA8 readback texture.
RECTANGLE
Box of a background color growing and shrinking transition body.
RECTANGLE_CROP
Box crop through a background color transition body.
REVOLVE
Spin-zoom with motion blur transition body.
RGBA_PRESENT_WGSL
GPU contain/rotation/premultiplication for browser-imported RGBA frames.
RGB_SPLIT
Built-in rgb-split body: red and blue sampled apart.
RGB_TO_YUV420_WGSL
GPU conversion from premultiplied RGB intermediates into planar YUV420.
RIPPLE
Radial ripple transition body.
RIPPLE_EFFECT
Built-in ripple body.
ROLLS
Picture rolling away around a corner transition body.
ROTATE
Spinning, tiled cross-fade transition body.
ROTATE_SCALE_FADE
Spin and scale through the frame’s edge transition body.
ROTATE_SCALE_VANISH
Spin and shrink into the next picture transition body.
SCALE_IN
Zoom-in cross-fade transition body.
SCREEN_MELT
Columns melting down the screen transition body.
SEPIA
Built-in sepia body.
SET_MATTE
Built-in body keeping the source where its matte input covers it.
SHADOW_COMBINE
Drop shadow’s last pass: the source over its softened shadow.
SHADOW_OFFSET
Drop shadow’s first pass: the source’s alpha moved, in the shadow color.
SHAKE
Built-in shake body.
SHAPE_WIPE
Iris wipe through one of several shapes transition body.
SHARPEN
Built-in sharpening body.
SIMPLE_FLIP
Flat card flip transition body.
SIMPLE_ZOOM
Center zoom transition body.
SIMPLE_ZOOM_OUT
Zoom-out reveal transition body.
SLIDES
Scaling slide from an edge, a corner or the centre transition body.
SOLARIZE
Built-in solarize body.
SPILL_SUPPRESS
Built-in spill-suppression body.
SPLIT_SLIDE_IN_HORIZONTAL
Two halves sliding in horizontally transition body.
SPLIT_SLIDE_IN_OUT_HORIZONTAL
Split horizontal push transition body.
SPLIT_SLIDE_IN_OUT_VERTICAL
Split vertical push transition body.
SPLIT_SLIDE_IN_VERTICAL
Two halves sliding in vertically transition body.
SPLIT_SLIDE_OUT_HORIZONTAL
Two halves sliding out horizontally transition body.
SPLIT_SLIDE_OUT_VERTICAL
Two halves sliding out vertically transition body.
SQUARES_WIRE
Directional grid-of-squares wipe transition body.
SQUEEZE
Vertical squeeze transition body.
STAR_WIPE
Bordered star wipe transition body.
STATIC_FADE
Cut through cells of static transition body.
STATIC_WIPE
Wipe behind a band of static transition body.
STRIP_DATAMOSH_GLITCH
Datamosh strips and tears transition body.
SURFACE_BLUR
Built-in edge-preserving (bilateral) blur body.
SWAP
Two cards swapping places transition body.
SWIRL
Swirl cross-fade transition body.
SWIRL_EFFECT
Built-in swirl body.
THRESHOLD
Built-in black-and-white threshold body.
TILE
Built-in tile body.
TILES_WAVE
Diagonal wave of flipping tiles transition body.
TOP_BOTTOM
Slide in vertically over a receding picture transition body.
TRANSITION_HELPERS
Alpha, boundary, hash and noise helpers shared by the transition bodies.
TURBULENT_DISPLACE
Built-in turbulent displace body.
TV_STATIC
Cut through full-frame TV static transition body.
UNCOVER
Outgoing picture sliding off the incoming one transition body.
UNDULATING_BURN_OUT
Wavy burning ring transition body.
UNSHARP_COMBINE
Unsharp mask’s last pass: the source pushed away from its blur.
VERTICAL_CLOSE
Barn doors closing vertically transition body.
VERTICAL_OPEN
Barn doors opening vertically transition body.
VHS
Built-in vhs body: wobbling rows, a tracking band, chroma bleed and grain.
VIBRANCE
Built-in vibrance body.
VIGNETTE
Built-in vignette body.
WATER_DROP
Water-drop ripple transition body.
WAVE_WARP
Built-in wave warp body.
WHIP_PAN
Motion-blurred push transition body.
WIND
Noisy wind wipe transition body.
WINDOW_BLINDS
Alternating window-blind transition body.
WINDOW_SLICE
Sliced-window transition body.
WIPE_DOWN
Top-to-bottom hard wipe transition body.
WIPE_LEFT
Right-to-left hard wipe transition body.
WIPE_RIGHT
Left-to-right hard wipe transition body.
WIPE_UP
Bottom-to-top hard wipe transition body.
X_AXIS_TRANSLATION
Sideways shift over a cross-fade transition body.
YUV16_TO_LINEAR_WGSL
YUV_TO_LINEAR_WGSL for 16-bit planes uploaded as unsigned integers, filtered in-shader.
YUV_REPACK_WGSL
Sample-for-sample copy of decoded 8-bit 4:2:0 planes into NV12 targets.
YUV_TO_LINEAR_WGSL
Limited/full-range BT.601/709/2020-NCL YUV plane conversion into linear RGB.
ZOOM_BLUR
Radial zoom-blur cross-fade transition body.
ZOOM_IN_CIRCLES
Concentric ring zoom transition body.
ZOOM_IN_OUT
Zoom-through cross-fade transition body.
ZOOM_LEFT_WIPE
Zoom punch, then a leftward wipe, transition body.
ZOOM_RIGHT_WIPE
Zoom punch, then a rightward wipe, transition body.