WebGL stuff is going well. I wrote a JavaScript implementation of the Diamond-Square terrain generation algorithm a while back (Not sure when, since the current year ticked over, I think), and had got a far as converting the square mesh to triangles, throwing it at the GPU, and getting pixels on screen, but I ran out of interest/energy while it was still in flatland.

Over this weekend however, I've beaten it into 3d, added lighting, and got an animated camera to "fly" round following the terrain! It looks really cool (well, ish, I'm using "normal per triangle" for the lighting, so triangles look flat, but I'm not convinced. On the other hand, normal per vertex would be a bunch of extra work).

I've even got as far as applying a tourus transform (to the position stuff, at least), but I'm having problems getting the camera in the right place.

I've got a couple of things to try next. First is to move the torus transform into the vertex shader. Second is to transform the eye, target, up vectors of lookat (I think I've only tried transforming eye).

Interestingly, those ideas are incompatible - either I can do the transforms in JavaScript (on the CPU) of in GLSL (on the GPU), bit not both.

Anyway. time for sleep. I wonder if the GPU can do trig?