Guides

How RASM works

Each guide explains one rendering technique on its own, with pictures first, and ends with an "In RASM" part that shows what the engine does and where in the code. Read them to learn a technique or before you change the engine. To build an application, the API reference is the place to start.

The engine on one page

Each box is a guide. Click one to open it. The top row runs on the CPU, the middle row on the GPU. Boxes with an orange border are tour pages that show how RASM fits together; the others explain one idea each.

CPU work GPU work
CPU · every frame and on change Your appAPI reference Load assetsworker pool Materialsbindless textures GPU scenetables, draw lists Uploadstaging, dirty rows one submit per frame GPU · every frame Frustumcull OcclusionHi-Z cull Drawindirect ShadePBR Passesrender graph Presentswapchain Under everything Big picture One frame Frames in flight The RHI GPU sync Struct layout
The path of a frame: assets become rows in GPU tables, the CPU uploads what changed, the GPU culls, draws, shades, runs the passes and presents, or with no window copies the image back (headless rendering and readback). The window can be RASM's own or your application's (the platform layer).

How a guide is built

Every concept guide has the same shape, so you always know where to look.

  1. In shortthe whole idea in five lines
  2. The problemwhat goes wrong without it
  3. How it workspictures, then the math
  4. Variants and pitfallsthe choices, and the usual bugs
  5. In RASMwhat the engine does, and where in the code
On every pageWhat it does
On this page (right side)The sections of the page. The one you are reading is marked.
Find a page (top left, or press /)Type a few letters to filter the list of pages. Enter opens the first match.
⤢ on a pictureShows the picture large. Esc closes it.
◀ Back / Next ▶ on a pictureSteps through the states of one diagram. The arrow keys work too.
ColorsBlue is CPU work, green is GPU work, amber is memory (buffers, textures), purple is shader code.

Find a guide by topic

You want to…Read
use RASM from C, Python, C#, Rust or ZigA stable C ABI
draw Dear ImGui windows from a binding (cimgui, ImGui.NET, imgui-rs) into RASM's frameTwo copies of one library
understand the engine before changing itThe big picture, One frame, The GPU scene tables
draw map vector data: roads, lakes, pointsVector lines, polygons and points
name places on a map: labels that never overlapText and labels
select what the mouse is over: an object, a road, a point on the groundPicking
show a reference grid, or CAD views that pan and zoom (orthographic)Reference grids, pan and zoom
draw a point cloud (LiDAR, a scan) colored by a valuePoint clouds
draw a vector field, particles or markers: a shape per data point, colored by a value, and streamlinesInstanced glyphs and data lines
draw dense see-through data (nested iso-surfaces, volume slices, see-through parts, glyphs) with no sorting artifactsWeighted blended transparency, after Transparency and alpha modes
save a still far larger than the screen (8K, 16K, a print poster) with no seams, as a 16-bit PNG or an EXRTiled offscreen export, after Headless rendering and readback
stream a LAS or LAZ scan bigger than GPU memoryStreaming point clouds
draw terrain from height map tilesTerrain from height maps
stream a map or an open world under a memory budgetTile streaming under a memory budget
add a render pass or post effectRender graphs
use last frame's image, several outputs, or less memory for render targetsHistory buffers, Multiple render targets, Transient memory and aliasing, Load and store ops
make the image brighter or darker, or change how bright lights lookTone mapping and exposure
smooth jagged edgesMSAA and alpha-to-coverage
smooth edges, thin lines and highlights over framesTemporal anti-aliasing
make bright lights glowBloom
light a scene with a sky photo, show the sky behind itImage-based lighting
add shadows to a sceneShadow mapping, Cascaded shadow maps, Shadows of spot and point lights
play a glTF model's animationsKeyframe animation
play a skinned glTF character (joints and weights)Skinning
blend a glTF mesh between shapes (morph targets), from a clip or from the applicationMorph targets
see normals, UVs, overdraw, LODs, culling, light counts or meshlets on screenDebug views
look at a render target, a depth, a Hi-Z level, the light clusters or an entity's GPU table rows while it runsInspecting GPU resources
show several views at once: split screen, a map in the corner, editor viewports, a camera's picture on a TV or in the UIMany views of one scene
move cameras with your own input, or several cameras at onceCamera controllers
add debug windows, sliders or tool panels to an appImmediate-mode UI
change a GPU struct or a shaderStruct layout rules
find why something is slowGPU timing and frame statistics
draw only the visible parts of big, dense meshesMeshlets and cluster culling
keep a frame free of heap allocations, or find the ones it makesHeap memory in the frame
load without slowing the frames: copies on the GPU's copy engineTransfer queues and ownership transfers
run compute work next to graphics workAsync compute and multiple queues

All guides

The numbers give a reading order, but each guide stands on its own.