for September, 2013

JavaScript WebGL

ShaderDSL.js: Writing shaders in JavaScript

If you have been playing with WebGL you probably have heard of GLSL, the shading language used with OpenGL and as a result WebGL. Due to its origin, GLSL is not very web developer friendly with a C style syntax, statically typed and an implicit data passing model (re:varying registers).

This is what a typical GLSL shader usually looks like:

As a recall, a shader program is made of a vertex (for vertices position) and a fragment (pixel color) shader. As you can see, it really is just C code embedded in the page, which may feel a little unnatural to most web developers.¬†That’s why we recently started a little experiment, to make shader programming a little easier and more web friendly, so please meet ShaderDSL.js, a project initiated and led by¬†Krzysztof Palacz at Adobe.

Posted on September 2, 2013 by Thibault Imbert · 6 comments Read More