Introducing gloc for Open Web Shader Linking

UPDATE: Check out video of David Sheets’ presentation at WebGL Camp Orlando from Friday March 16.

UPDATE: David Sheets is scheduled to speak at the next San Francisco WebGL Developer’s Meetup in May.

We have just released our first version of gloc, a toolkit for WebGL and OpenGL ES2 GLSL shaders. The purpose of gloc is to make it much easier to build – and much easier to share – shaders. As a result, we hope gloc will help to further the creative potential of 3D graphics on the web and mobile platforms. (gloc links our creativity!)

With gloc, shaders and shader fragments, for numerical and graphics functions, become portable first-class web resources.

What gloc enables:

  • Libraries of shader functions
  • Capability-based shader component fall-backs
  • Collaborative shading effect mash-ups
  • LD_PRELOAD-like functionality
  • Compression by factorization of common shader functions

What gloc makes much easier:

  • Semantically-linked shaders in visualization systems
  • Cascading shaders for selective overriding
  • User Interface effects and compositing
  • and much more!

Where gloc lives:

The source code for the gloc suite version 1.0.0 has been released under the BSD 3-Clause license on GitHub. A Web interface is immediately available.

How gloc works:


gloc pipeline: gloc transforms ES SL into glo object files which are subsequently linked by glol with other glo resources to produce complete WebGL shaders.

Continue reading