Shaders in Processing 2

Processing 2, released in 2013, introduced many improvements and new functionality. Among them, a brand new OpenGL library for 2D and 3D graphics, which I developed based on my work with the GLGraphics library. This new OpenGL renderer featured full support for GLSL shaders and faster rendering thanks to several internal optimizations, like vertex buffers and geometry caching. Likewise, the new core video library was based on GSVideo and thus offered much better performance for video playback and capture.

The new PShader API is described in this in-depth tutorial, and additional online resources can be useful to learn how to write shaders in Processing and other frameworks and tools for code-based art.

Since Processing 2, the OpenGL renderer continued to be improved thanks to the contributions of Jakub Valtar and Gottfried Haider, and many artists use Processing to create beautiful work that shows what is possible with these tools.

Contributed libraries such as PixelFlow and HE_Mesh extend the capabilities of the Processing graphics even further into GPU-Computing (fluid Simulation, image processing, particle systems) and manipulation of complex geometry.