Skip to main content

Crate alpha2_shaders

Crate alpha2_shaders 

Source
Expand description

Reusable shader assets for the alpha2 render pipeline.

Shader source lives under shaders/, never inline in Rust, and is split by how it reaches the GPU:

  • shaders/build/*.wesl are complete modules with their own entry points. build.rs resolves their imports and flattens each one into WGSL at build time, so they are embedded here already compiled.
  • shaders/runtime/**/*.wgsl are effect bodies, not modules. They are not valid on their own: alpha2-render generates a per-effect preamble from the effect’s parameter schema and concatenates the body onto it, which is why these cannot be resolved ahead of time.

Constants§

ANGULAR
Angular sweep transition body.
CANVAS_PRESENT_WGSL
Full-screen triangle drawing a rendered frame onto a browser canvas.
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_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.
CROP
Built-in crop body.
CROSS_WARP
Cross-warp transition body.
DIRECTIONAL
Directional slide transition body.
DIRECTIONAL_WARP
Directional warp transition body.
DIRECTIONAL_WIPE
Soft directional wipe transition body.
DREAMY
Dreamy vertical-warp transition body.
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.
FILM_GRAIN
Built-in procedural film-grain 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.
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.
HEART
Heart-shaped reveal transition body.
LUT_3D_BODY
Author body for the built-in resource-backed 3D LUT effect.
MIRROR
Built-in mirror body.
MORPH
Color-driven morph transition body.
PINWHEEL
Rotating pinwheel transition body.
PIXELATE_EFFECT
Built-in pixelation body.
PIXELIZE
Pixelated cross-fade transition body.
POLKA_DOTS_CURTAIN
Polka-dot curtain transition body.
RADIAL
Radial sweep transition body.
READBACK_PACK_WGSL
GPU quantization from float intermediates into an RGBA8 readback texture.
RGBA_PRESENT_WGSL
GPU contain/rotation/premultiplication for browser-imported RGBA frames.
RGB_TO_YUV420_WGSL
GPU conversion from premultiplied RGB intermediates into planar YUV420.
RIPPLE
Radial ripple transition body.
SHARPEN
Built-in sharpening body.
SIMPLE_ZOOM
Center zoom transition body.
SQUEEZE
Vertical squeeze transition body.
TRANSITION_HELPERS
Alpha and boundary helpers shared by the built-in transition bodies, and the entry point that runs them in gl-transitions’ bottom-left uv.
VIGNETTE
Built-in vignette 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.
YUV16_TO_LINEAR_WGSL
YUV_TO_LINEAR_WGSL for 16-bit containers uploaded as unsigned integers, which it filters and normalizes itself.
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.