Expand description
The Liquid Glass material: Gaussian backdrop frost followed by wcKSRD
refraction applied to a composable’s own bounds through
LiquidModifierExt::glass_effect — the analogue of SwiftUI’s
.glassEffect(_:in:).
Structs§
- Glass
- Builder describing a glass material. Resolved against the theme at the composition site, then evaluated per frame for density and dynamics.
- Glass
Contour Highlight - Reflection of opposing lights across a narrow band around the surface contour. The reflected environment is brightest along the light axis and darkest between the lights. Nonfinite fields or nonpositive height or spread disable this treatment.
- Glass
Deformation - A normalized motion axis and reciprocal scales for incompressible glass. Construction derives the cross-axis scale, so callers cannot describe a deformation that changes the bubble’s area.
- Glass
Dynamics - Per-frame motion inputs for an interactive glass element, read lazily at scene-build time (no recomposition per frame).
- Glass
Face Response - Face attenuation before edge lighting, followed by additive illumination. Edge lenses attenuate the inner refraction image before chromatic sampling. Invalid or nonfinite parameters disable the response.
- Glass
Face Tone - A fixed luminance transfer with an independent chroma gain.
Luminance
ybecomesblack + (white - black) * y - (1 - max_luminance) * y²; chroma is scaled bysaturationand the combined RGB is clamped to zero–one. - Glass
KeyFill - Opposing edge lights whose color responds to the backdrop. Nonfinite fields or nonpositive height or curvature disable this treatment.
- Glass
Morph - A liquid shapeshift frame: the primary shape plus any number of nearby
glass shapes, ALL smooth-unioned into one field — liquid glass glues to
whatever glass it passes near (a growing menu necks with a neighboring
button, the drag lens merges with the search circle). Up to
GlassMorph::MAX_SHAPESextra shapes; an angular wobble makes the mid-flight field bubble like a droplet. All geometry is node-local dp:(center_x, center_y, width, height, corner_radius); radius sentinel-1means capsule;-2means SUBTRACT capsule — the shape carves a smooth hole in the field (the growing menu leaves its anchor button crisp on top until it swallows it). - Glass
Shadow - Shadow owned by a glass surface. Morphing glass evaluates the same live SDF for this shadow; clipped static glass forwards the values to the layer shadow primitive.
- Glass
Spectrum - Seven-tap RGB spectrum for an edge lens. Distances follow the surface transform. Nonfinite values, negative extents, or opacities outside zero to one are ignored.
- Glass
Specular Highlight - Backdrop-dependent reflections from opposing lights, with a sharp rim and a softer inward lobe. Invalid dimensions or nonfinite fields disable the reflection.
Enums§
- Glass
Refraction - The projection used to transmit the captured backdrop through glass.
- Glass
Variant - Material variant, mirroring SwiftUI’s
.regular/.clearglass, plus the interactive lens. - Liquid
Shape - The shape of a glass element (also its clip and shadow shape).
Traits§
- Liquid
Modifier Ext - Modifier extension installing the Liquid Glass material.
Functions§
- glass_
light_ direction - The current ambient glass light return direction.
- set_
glass_ light_ direction - Sets the ambient glass light return direction (screen space, need not be normalized — the shader normalizes). Feed device attitude here.