1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//! GPU instance data for glyph (text) rendering.
//!
//! Each visible glyph in a frame becomes one `GlyphInstance`. The vertex
//! shader reads these instances to construct a screen-space quad; the
//! fragment shader samples the R8Unorm atlas and multiplies the alpha by the
//! text color.
//!
//! Memory layout (64 bytes, 16-byte aligned):
//! - pos: 8 bytes (vec2<f32>)
//! - size: 8 bytes (vec2<f32>)
//! - uv_pos: 8 bytes (vec2<f32>)
//! - uv_size: 8 bytes (vec2<f32>)
//! - color: 16 bytes (vec4<f32>)
//! - clip_rect: 16 bytes (vec4<f32>)
//! Total: 64 bytes
use ;
/// A single glyph quad uploaded to the GPU as an instance.
const _: = assert!;
const _: = assert!;