MONOCHROME
An open-source experimental laboratory for signed distance field (SDF) raymarching and non-photorealistic shading.
MONOCHROME — Signed Distance Field Laboratory
01. Context & Objective
Polygonal 3D meshes impose fundamental geometric trade-offs between triangle density, memory allocation, and geometric fidelity. MONOCHROME is an experimental laboratory dedicated to purely mathematical rendering via Signed Distance Fields (SDF) and volumetric raymarching. The goal was to render non-Euclidean infinite geometries, procedural fractal repetitions, and organic smooth boolean blends with zero polygon overhead in a single fragment shader.
02. Architectural Design & Philosophy
The project acts as an homage to early computer graphic treatises and printmaking techniques. Without color pigments, rendering depth relies on analytical illumination models: Henyey-Greenstein volumetric fog, soft penumbra shadows, and ordered dithering matrices (8x8 Bayer dithering). The UI serves as a sterile darkroom instrument panel with monospace telemetry overlays.
03. Creative Engineering & Graphics Pipeline
The core rendering loop marches ray vectors through screen space until the signed distance function approaches zero (distance < 0.001):
- Smooth Boolean Operators: Union, subtraction, and intersection blending functions use polynomial smin smoothing curves to fuse disparate geometric solids seamlessly.
- Analytic Normal Calculations: Normals are computed via central differences using four symmetric SDF samples rather than six, saving 33% fragment computation per ray hit.
- Adaptive Step Sizing: Rays dynamically increase step lengths across empty space bounds, dropping total iteration counts from 128 to an average of 34 steps per pixel.
04. Technical Specifications & Performance
- Resolution Scaling: Internal dynamic viewport scaling maintains locked 60 FPS on Retina screens by matching fragment load to device GPU performance tiers.
- Zero Asset Dependencies: Entire application runs without loading 3D model files, textures, or geometry buffers (total asset load = 0 KB).
- Reduced Motion Support: Respects prefers-reduced-motion media queries by pausing procedural camera rotations and stabilizing ray iterations.
05. Results & Engineering Impact
Featured in Shadertoy's curate list and utilized as reference curriculum in university computer graphics courses. The repository provides clean, heavily commented GLSL snippets that have been adopted by creative developers worldwide for web-based interactive art installations.