MXVK Vulkan Framework 0.24.0
C++20 Vulkan rendering framework for practical 2D and 3D application development with SDL3.
Loading...
Searching...
No Matches
matrix Directory Reference

Files

 
matrix.cpp

Detailed Description

Matrix Rain

image

Matrix Rain recreates the classic falling-glyph effect using SDL_ttf and MXVK sprites. The glyphs are rendered into an off-screen SDL surface, tinted by depth level, and uploaded into a texture every frame. The bundled default font is the bold Noto Sans CJK JP face; use --font-path <file> to point at another font.

Controls

  • Space - randomize the streams and clear the canvas
  • Escape - quit
  • --binary - limit the glyph set to 0 and 1
  • --font-size <px> - set the glyph raster size in pixels
  • --font-path <file> - override the bundled bold font file used for glyphs
  • --color <spec> - tint the rain using #RRGGBB or R,G,B

How It Works

The sample builds a glyph set from the bundled bold Noto Sans CJK JP font, lays out vertical streams to match the current window size, and updates their positions on a timer. The canvas is then uploaded to a sprite and drawn to the swapchain, so the whole effect stays inside the Vulkan presentation loop.