Skip to main content

Module ui_layer_renderer

Module ui_layer_renderer 

Source
Expand description

UI layer renderer — executes UiDrawCommands with a separate shader program, orthographic projection, and no post-processing.

Uses the same instanced glyph rendering approach as the 3D pass but with:

  • Orthographic projection: (0,0) = top-left, (W,H) = bottom-right
  • Depth test disabled
  • Alpha blending enabled for semi-transparent panels
  • Optional SDF path for razor-sharp text at all scales

Structs§

RectInstance
A solid-color rectangle instance for panel backgrounds and bars.
UiLayerRenderer
Renderer for the screen-space UI layer.

Constants§

RECT_FRAG_SRC
Fragment shader for solid-color rectangles.
RECT_VERT_SRC
Vertex shader for solid-color rectangles.
UI_FRAG_SRC
Fragment shader for UI layer — simple textured quad, no post-processing unless emission > 0.
UI_VERT_SRC
Vertex shader for UI layer — same as glyph.vert but without Y-flip (the ortho projection handles orientation correctly).