ThNdl shader tutorial in Processing / Get started with GLSL
in
Share your Work
•
10 months ago
Hello everyone,
Two months ago, Andrew Baldwing started publishing a series on articles on his blog (
http://thndl.com) about GLSL (OpenGL Shading Language). If you don't know the power of shaders yet, I recommend having a look at the GLSL sandbox:
http://glsl.heroku.com/
In Andrew's own words: “When I first heard about shaders, I have to admit they sounded like scary arcane magic that I would never be able get to grips with. But it turned out that the magic was mostly just boilerplate setup code you needed to get started, and once you got past that they were actually quite simple.”
His blog includes a GLSL interpreter that gets the “boilerplate” code out of the way and lets you experiment with the core instructions of the shader. I thought it would be interesting though to see if these examples could be ported to Processing so here they are:
The sketch folder, includes a glsl file (with explanatory comments) that regroups all the shaders from the ThNdl articles published so far.
The sketch and shader file are intended to accompany the reading of the tutorials at
http://thndl.com. You will need Processing 2.0b6 or superior.
Note for mac users: Xcode does syntax coloring for GLSL.
Many thanks to Adrew Baldwing and to Andres Colubri for his work on shaders in Processing 2.0 and his articles that were a lot of help (
http://codeanticode.wordpress.com/).
Happy shading!
Raphaël
6