pub struct BuiltinShapeUniforms {
pub color: [f32; 4],
pub color2: [f32; 4],
pub shape: [f32; 4],
pub params: [f32; 4],
pub quad: [f32; 2],
}Expand description
The one uniform layout every built-in pipeline binds.
All geometry is in the RECORDING’s units (quad-local), with quad
carrying the quad’s size in those same units. The shader computes
px_scale = rosace_quad.size_px / quad and scales everything itself —
so a conversion done at logical px (widget recording, scaled ×DPR at
replay) and one done at physical px (scale 1:1) are BOTH correct, and
HiDPI can never desynchronize uniforms from quad placement.
Fields§
§color: [f32; 4]Primary color, LINEAR straight-alpha RGBA.
color2: [f32; 4]Secondary color (gradient to), LINEAR straight-alpha RGBA.
shape: [f32; 4]Shape geometry in quad-local units: rects (x, y, w, h); arcs (center_x, center_y, unused, unused).
params: [f32; 4]Pipeline-specific parameters — see each conversion fn.
quad: [f32; 2]The quad’s (w, h) in the same units as shape/params lengths.