Reaction Diffusion - p5 and webgl

edited January 2018 in Share Your Work

Reaction Diffusion Demo, done in p5js and some low-level WebGL (dwgl.js).

It takes a bit to figure out what the 4 main controllers (da,db,kill and feed) are doing, but after that it's kind of fun to play with and generates quite interesting results.

It targets Webgl2 but should work for most Webgl1-only bowsers too. If you get errors, just drop a note. Also, in my experience there is still quite a big difference in performance when testing different browsers. However, the demo should run smoothly at around 60fps with the default settings.

The reaction diffusion sketch itself is a port from the pixelflow library. I updated the shader a bit to get some coloring. All(?) PixelFlow shaders are basically Webgl2-ready shaders (#version 300 es) ... therefore no further conversion is required. Getting PixelFlow shaders running in Webgl1 requires a bit more work, but should generally be possible.

diewald_ReactionDiffusion1_webgl diewald_ReactionDiffusion2_webgl diewald_ReactionDiffusion3_webgl


Sign In or Register to comment.