Post

Google+ post
Tim HuttonTim Hutton - 2014-12-20 07:00:19+0000 - Updated: 2014-12-20 07:00:19+0000
Originally shared by Cornus AmmonisIt's been a while since I last posted, but happily I have something cool to show off. I've taken my "Smoke" pattern posted some time ago (YouTube video here http://youtu.be/x--qypby6vQ ) and ported it to run as an interactive #WebGL demo, linked below, based on prior art by Pablo Márquez-Neila (https://twitter.com/pmneila). I plan to port a few other patterns from my earlier work as well. Ultimately I'd like to be able to express this type of system as a JSON file including parameters, rendering pipeline options, presets, etc. along the lines of Ready.

As for WebGL itself, here's my trip report. Performance is impressive, comparable to native code for projects using shaders for the majority of computation. WebGL is missing some features of modern OpenGL, whether this matters is largely application-dependent. As for stability, to my surprise I've found Firefox's implementation to be considerably more stable on my machines(s) than Chrome. The latter "gracefully" crashes frequently, such that WebGL support needs to be manually restarted, which itself doesn't always work. The biggest sticking point for me was using WebGL with a render-to-texture model, which is required for feedback systems like Smoke or reaction-diffusion simulations in general. That's somewhat exotic in the WebGL world and isn't supported by some shader demo sites (and browsers for that matter) like +Shadertoy  as far as I can tell. There's also the issue that GLSL shaders render to 4-channel textures at most, which greatly complicates porting code that requires more than 4 inputs and outputs per point.

In other news, I have a twitter now, https://twitter.com/cornusammonis where I'll occasionally be posting mostly graphics and programming-related stuff. Follow if you like.

Smoke

Shared with: Public

This post was originally on Google+