Skip to main content

Module primitives

Module primitives 

Source
Expand description

GPU primitive batching

Defines GPU-ready data structures that match the shader uniform layouts. All structures use #[repr(C)] and implement bytemuck::Pod for safe GPU buffer copies.

Structs§

BlurUniforms
Uniforms for Kawase blur shader
ColorMatrixUniforms
Uniforms for color matrix shader
CompositeUniforms
Uniform buffer for compositor
DropShadowUniforms
Uniforms for drop shadow shader
GlassUniforms
Uniform buffer for glass shader
GlowUniforms
Uniforms for the glow effect shader
GpuGlassPrimitive
A GPU glass primitive for vibrancy/blur effects (matches shader GlassPrimitive struct)
GpuGlyph
A GPU text glyph instance (matches shader GlyphInstance struct)
GpuPrimitive
A GPU primitive ready for rendering (matches shader Primitive struct)
GpuRectDeprecated
Legacy rectangle primitive (deprecated - use GpuPrimitive instead)
LayerCommandEntry
A recorded layer command with its primitive index
LayerCompositeUniforms
Uniform buffer for layer composition
MaskImageUniforms
Uniforms for the mask image effect shader
ParticleViewport3D
GPU particle viewport for rendering particle systems
PathBatch
A batch of tessellated path geometry
PathUniforms
Uniform buffer for path rendering Layout matches shader struct exactly:
PrimitiveBatch
Batch of GPU primitives for efficient rendering
Sdf3DUniform
Uniform data for 3D SDF raymarching
ShapeDesc
Per-shape descriptor for 3D group composition (64 bytes, 4 vec4s)
Uniforms
Uniform buffer for viewport information
Viewport3D
A 3D viewport to be rendered via raymarching

Enums§

ClipType
Clip types for primitives
FillType
Fill types (must match shader constants)
GlassType
Glass material types (must match shader constants)
LayerCommand
Commands for layer operations during rendering
PrimitiveType
Primitive types (must match shader constants)

Constants§

MAX_GROUP_SHAPES
Max shapes per 3D group (practical limit for uniform/storage buffer)