Writing
Maps, graphics, layout engines, and game development. Things I’ve learned by building them.
2025
Notes from benchmarking WASM and optimized JS
One night I got an intrusive thought: I never compared the fast CDT Zig code to some baseline JS implementation.
WebGPU: OBJ Loading and Perspective Camera
Tiny guide how to get started with WebGPU – loading OBJ files and an interactive perspective camera.
Handmade pathfinding mesh for games
Ever thought that implementing dynamic constrained Delaunay triangulation shouldn't be that hard?
2024
Unicode Text Rendering in Zig with FreeType and HarfBuzz
For a change I am not reinventing the wheel but using state-of-the-art libraries to render (almost) any text.
Open Problems of A* for Any Angle Pathfinding
Exploration of various ways to apply A* for any angle Euclidean path search problem.
Constrained Delaunay Triangulation from a Paper
Sloan's fast algorithm for generating constrained Delaunay triangulation implemented from a paper.
2023
Drawing Text in WebGPU Using Just the Font File
How to parse TTF font file to render text using the SDF (Signed Distance Field) method.
Thousands of Styled Rectangles at 120 FPS on the GPU
Secrets of rendering extremely fast UIs in WebGPU by minimizing overhead on the GPU.
PBR in WebGPU: Implementation Details
Short write-up on how to implement a physically based renderer with Image Based Lighting using WebGPU.
How to Write a Flexbox Layout Engine
You won't guess how little code it takes to write a Flexbox-like layout engine that can arrange many common UIs.
Using Zig for Writing OpenGL in Browsers
What if, instead of running JS everywhere, we went all-in hardcore low-level coding?
2021
Understanding React by Implementing It
From the creator of broken Google Maps clone, now a broken React ready to conquer your node_modules.
Baked Lighting in react-three-fiber
Technique of baking light used for achieving very well performing Three.js scene with amazing visuals.
Making of: 3D Chess in React
Summary of how I made a playable Chess game in React using React Three Fiber and 3D assets I made in Blender.
2019
TTF File Parsing
Font files, although binary, are not hard to parse. Even in JavaScript.
Making Our Own Tiny Google Maps
Have you ever dreamed about creating your own interactive maps like the Google Maps?
Fetching Data from OpenStreetMap
A non-obvious task of downloading data from OSM has unexpected, highly programmable solutions.
Triangulation of Polygons
Triangulation is the thing you need when you have polygons, but GPU can only render triangles.
Wireframes with Barycentric Coordinates
A handy hack to render wireframe of a mesh. Use barycentric coordinates to achieve uniform edge width.