Expand description
What fills a shape.
A material is the paint as a backend sees it: fully resolved, in clip space, and packed into the layout the shader expects. Resolving happens above, because gradient geometry has to travel through the same transform the shape did.
Modules§
- filter
- Filter selector shared with the shader.
- kind
- Kind selector shared with the shader.
- layout
- Offsets into the packed layout, matching the shader’s declaration.
- sampling
- Sampling selector shared with the shader.
- tile
- Tile mode selector shared with the shader.
Structs§
- Stop
- A color stop.
Enums§
- Color
Filter - A function applied to a material’s color, after the material and before the blend.
- Color
Form - What space a color filter’s matrix expects its input in.
- Gamma
- Which way through the sRGB transfer function a
ColorFilter::Gammagoes. - Material
- How a shape is filled.
- Material
Variant - Sampling
- How a texture is read between its texels.
- Tile
Mode - What happens outside an image’s own bounds.
Constants§
- MATERIAL_
FLOATS - Floats in the packed representation.
- MAX_
EFFECT_ TEXTURES - How many textures one runtime program may sample.
- MAX_
STOPS - The most stops a gradient carries in the material itself.
- MORPHOLOGY_
TAPS - How far one morphology pass reaches, in texels each way.
- RUNTIME_
FLOATS - How many floats a runtime effect may take.
Type Aliases§
- ToLocal
- Maps a clip-space offset into a gradient’s own space, in column order.