_____ ___ ___ ___ _ _ _____
/ ___|| \/ | / _ \ | | | | / ___|
\ `--. | . . |/ /_\ \| | | | \ `--.
`--. \| |\/| || _ || | | | `--. \
/\__/ /| | | || | | || |___| |___/\__/ /
\____/ \_| |_/\_| |_/\_____\_____\____/
Raymarching Made Simple
High-level DSL for GLSL. Write SDF scenes, demoscene effects, and shaders without boilerplate.
3D SDF scenes in one line. No ray loop, no gradient math. The compiler handles it.
sphere(r: 0.4 + bass * 0.2)
.smoothUnion(box3d(w: 0.3, h: 0.3, d: 0.3), k: 0.15)
.material("glow").raymarch() |> out
50+ classic effects: plasma, tunnel, copper bars, starfield, metaballs. From Amiga to DOS demos, built-in.
plasma(scale: 2.0, speed: 0.4)
.colorize("fire")
.feedback(0.92) |> out
Hot reload without breaking visuals. Change a number → instant. Change logic → background compile. Time never resets.
Optional audio input. bass, mid, high, onset, bpm built-in. Use it or ignore it.
circle(r: 0.3 + bass * 0.2)
.repeat(6).fill()
.colorize("ice") |> out
Need raw GLSL? Use glsl`...` blocks. Full shader access when needed.
// 3D SDF raymarching with smooth blend
sphere(r: 0.3 + bass * 0.2)
.smoothUnion(
box3d(w: 0.25, h: 0.25, d: 0.25),
k: 0.1 + mid * 0.2
)
.material("glow")
.raymarch(radius: 2.5, speed: 0.15)
.feedback(0.88)
|> out
Raymarched 3D with CSG. Compiler generates the full raymarch loop — you compose shapes.
// Plasma (Amiga / PC demos, ~1990)
plasma(scale: 2.0, speed: 0.4)
.colorize("fire")
.feedback(0.92)
|> out
// XOR pattern (DOS Mode X, 256 colors)
xor(scale: 1.0)
.colorize("neon", shift: time * 0.1)
|> out
// Tunnel (classic effect, infinite depth)
tunnel(texture: checker(8), speed: 0.5, twist: 0.3)
|> out
Classic demoscene effects (1985-2000). Plasma, XOR patterns, tunnel — all built-in.
// Render to multiple outputs
plasma(scale: 2.0).colorize("fire") |> out0
starfield(count: 1000, speed: 1.0) |> out1
sphere(r: 0.4)
.material("glass")
.raymarch()
|> out2
// Compose them
mix(src(0), src(1), 0.5)
.blend(src(2), mode: "screen")
|> out3
Multiple render targets. Use src() to compose layers.
# Why Smalls?
GLSL raymarching requires ~80 lines of boilerplate before
you can render a sphere. Smalls compiles a high-level DSL
to GLSL. You describe shapes, the compiler generates the
raymarch loop, SDF functions, lighting, and camera.
# Demoscene Heritage
The demoscene (1980s-2000s) pushed real-time graphics on
Amiga, C64, and DOS. Effects coded in assembly: plasma,
copper bars, tunnel zoom, XOR patterns, shadebobs.
Smalls includes 50+ classic effects as built-in primitives.
# Live Coding
Built for live coders, VJs, and shader artists. Works
standalone or integrates with other tools via OSC/MIDI.
# Beta Status
Smalls is in beta. Abstraction over GLSL is complex,
especially mixing SDF raymarching with 2D effects.
Some things might break.
Bug reports: toni@playabit.net