17 Dec 2014
This is a WebGL shader that applies a Gaussian blur along an arbitrary angle, which makes it appropriate for motion blur effects. I wasn't able to find any such WebGL shader on the web, which is what led to my first earnest attempt towards learning shader programming.
The following parameters can be set at runtime via uniforms:
- number of samples used to create the blur
- pixel distance between samples
- blur angle
Gaussian blur works by sampling and averaging color values from a middle point going outwards along an axis. Points closer to the center are factored in more than those further away, such that those values form a bell curve.
In this implementation, the vertex shader computes the texture coordinates and sample weights in varying arrays that get passed to the fragment shader. This is done based on the premise that avoiding texture lookups in the fragment shader may be faster (see here). However, because there are hard limitations on the amount of data that can be passed thru varyings in WebGL depending on browser, it may not run in all browsers (use Chrome, in other words). Moving all the logic to the fragment shader or devising some other design compromise could get around this incompatibility at the expense of performance or flexibility.
19 Nov 2014
This is a volumetric voxel drawing library for the browser which originally started as a 'Hello World' exercise for three.js and pixi.js. It renders in 3D using three.js or in isometric 2D using pixi.
02 Aug 2014
This was written as an exercise in learning Scala and experimenting with concurrency using Akka, using Processing as the front-end library.
Also of potential interest in the source is a minimal number-tweening library written in Scala, found in /src/leelib/tween.
The video capture shows how the visualizer starts to break down as we zoom in beyond what double-precision floating point can handle.
From late 2013.
12 Jun 2014
I've been keeping a publicly viewable wiki of developer notes for a while now (running on PmWiki), but when I switched to taking notes using Google Documents, I still wanted a way to make them publicly accessible.
Drive Wiki Maker is a node.js service which generates static html files from documents on Google Drive, and makes them browsable through a public front-end.
It can run in the background on a server to automatically update documents in an assigned Google Drive directory on an interval. It also includes a front-end configuration dashboard.
31 Mar 2014
What started out as a quick test with sockets inevitably grew into a fully baked app.