Skip to content
modkitv0.2

Offscreen render-to-texture + composite via the pass API

← All examples28_pipeline

Demonstrates: - mk_render_target_scaled(): an auto-resizing offscreen color+depth target - Pass 1: mk_pass_offscreen_3d() renders the 3D scene into the target - Pass 2: mk_pass_clear() composites the scene texture into a 2D UI layout - mk_pass_canvas()/mk_pass_draw3d()/mk_pass_text(): pass-pooled contexts - Interactive UI that controls the 3D scene Frame structure: 1. Scene pass: 3D geometry -> scene texture (0.75x scale) 2. UI pass: 2D overlay with controls, scene texture drawn as a sprite Controls: - Mouse drag in scene viewport: Orbit camera - Scroll: Zoom - Click UI buttons: Toggle options - ESC: Quit

Offscreen render-to-texture + composite via the pass API

Runs the WebAssembly build on this page. Click the canvas to give it keyboard focus.

Number
28
Tags
2dvector3dtextrender-targettexture
Requires
MODKIT_ENABLE_FONT
Source
examples/28_pipeline/main.c

Build and run

./scripts/build-linux.sh release --target=28_pipeline --run