Skip to main content

ui_vertex

Function ui_vertex 

Source
pub fn ui_vertex(
    vertex_index: u32,
    draw_call_id: Id<UiDrawCallDescriptor>,
    slab: &[u32],
    out_uv: &mut Vec2,
    out_color: &mut Vec4,
    out_draw_call_id: &mut u32,
    out_clip_pos: &mut Vec4,
)
Expand description

2D UI vertex shader.

For SDF-based elements (Rectangle, Circle, Ellipse), this generates 6 vertices (2 triangles) per instance from the element’s position and size, reading from the slab. The vertex index (0..5) selects which corner of the quad.

For Path elements, the vertex data is read directly from the slab (pre-tessellated vertices).