public readonly record struct UiVertexOne vertex of the interface, in the layout both UI shaders read.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
⚠ One layout for both, rather than one per shader. Two layouts would mean two vertex buffers, two uploads and two places for a batch to point at, to save sixteen bytes on a vertex count that is in the thousands rather than the millions — an interface is not a mesh. What it buys is that a frame is one buffer and one copy however many kinds of thing it draws.
Fields a kind does not use are zero, exactly as DrawCommand does it, and for the same reason: the consumer switches on the batch anyway.
Fields and properties (4)
public Vector2 PositionWhere it is, in document pixels.
public Vector2 TextureAn atlas coordinate for text, and the offset from the shape's centre for everything else.
public Color4 ColorIts colour, in linear space.
public Vector4 ShapeWhat the shader needs beyond the position: for a box, the index of its record in Shapes; for a glyph, the screen-pixel range; for a path triangle, how much of the pixel the shape covers there. Only the first lane is ever read.
Methods (1)
Used by (8)
- IconAtlasTestsVixen.Ui.Tests
- NineSliceImageTestsVixen.Ui.Tests
- PathTessellationCacheTestsVixen.Ui.Tests
- SoftwareUiRasterizerVixen.Ui.Testing
- UiGeometryVixen.Ui
- UiGeometryBuilderVixen.Ui
- UiGeometryTestsVixen.Ui.Tests
- UiRendererVixen.Ui.Renderer