Expand description
Mask shapes used by Container::clip
to clip a node’s rendered subtree to a region.
Coordinates are NDC [-1, +1]² — the mask is in screen space, not
container-local space. The recording-quad use case (cinematic
rounded-corner crop on a fixed-position recording surface) is the
primary driver. Transform-aware clipping (“clip a moving sprite to
its own bounds”) is a future enhancement.
At render-time, a clipped container’s subtree is rendered into a
foreground RenderTexture, then the MaskShape’s SDF is sampled
per-pixel and multiplied into the alpha channel before the composite
is blended back onto the parent. See render::clip for the
pipeline.
Enums§
- Mask
Shape - Shape of a clip / mask region.