ABSTRACT

In 2009, Ryan Dahl released Node.js,* a platform for writing applications with JavaScript. Shortly thereafter Mikeal Rogers released npm,† Node’s officially endorsed package manager and registry. npm came with features and ideals that have since become central to supporting the Node.js ecosystem. These include Semantic Versioning, nested dependencies, and, in particular, the encouragement of “small modules”: granular dependencies that do one thing well, making them easier to combine and reuse.‡

glslify is an effort to apply some of the same functionality and ideals to GLSL by introducing a simple module system inspired by Node.js, taking advantage of the existing npm ecosystem for module distribution. In doing so, we can improve the initial learning curve

13.1 Introduction 13.2 Modular Programming in Node.js 13.3 What Is glslify? 13.4 Source Transforms 13.5 Shortcomings 13.6 Contributing Bibliography

of GLSL and WebGL, as well as improve our productivity by sharing shader code between projects for straightforward consumption.