GLSL Sandbox

One of the things WebGL will bring us is Fragment Shaders. If you’re familiar with Pixel Bender you know how Fragment Shaders work.

Although they usually go with Vertex Shaders, you can set it up for doing just 2D effects with it. Iq did exactly this some months ago with Shader Toy — a browser based Fragment Shader editor.

This week I started experimenting with this. First thing I needed to do was a sandbox with the basic WebGL initialisation code. With that done is just a matter of testing values and refreshing the browser. I tried to have a compile button right in the page so I wouldn’t even need to refresh the browser but it was over complicating the code…

These are the tests I’ve done so far:

Next thing on the list is to implement render to texture so I can use the output of the fragment shader as input. That’ll allow crazy feedback effects and even crazier drawing tools!

Feel free to use the sandbox code for your own experimentation.

No Responses to “GLSL Sandbox”

Post a Comment