Work continues. After making some changes to GLSL registers and how that is reported through the stack all the way up to WebGL, I was pleased to discover that lesson 15 is now (mostly) working correctly. My guess is that there must not have been enough registers to run correctly, but I’m not 100% sure on that. There are still some minor graphical artifacts, but it appears to be the same problem as the Earth demo, so if I can figure that one out, then that should fix both of them. Probably an overflow, as it seems to localize around areas of strong lighting influence.
After that, that leaves only demo 16, which will require some additional functionality, and demo 10, which seems to be showing a severe clipping bug.

– A reworked driver structure allowing the use of alternative rendering methods. A Stage3D flash driver is in development. A native WebGL driver is also in development (for debugging the software WebGL and gl layers).

– Asynchronous software rendering. Overall performance will decrease slightly, but the tradeoff is a massive improvement in browser responsiveness.

– Miscellaneous rendering improvements. Most of the demo artifacts have been eliminated.

– Automatic performance tuning functionality has been removed. Ideally, this should be handled at the application level.

After months of work, I am pleased to announce the release of cWebGL v0.2.0. New in this release is a completely refactored GLSL compiler which will produce valid GPU ARB assembly code, and an ARB to Javascript translator and execution subsystem. This release also offers a slight performance improvement, with the possibility of more improvements in the immediate future. Download it at the google code project page here.

Things have been slow recently on the main branch due to work on a massive rewrite of the compiler. Currently, the compiler was mostly a proof of concept, doing a direct translation of the parsed syntax tree into a corresponding javascript representation. While this approach produces a pretty good result, there are some things which would not have worked or would have been extremely difficult to implement as such (e.g. LHS swizzles). Furthermore, a full rewrite would have been necessary anyway to output different targets, such as when Flash Stage3D/AGAL support is built in. This rewrite should be complete in the next week or two.

When done, the new compiler will function as a GLSL->ARB compiler, meaning that it could in theory be used to produce real ARB assembly code, though most likely the output will be very unoptimized.
On the back-end will be a set of translators from ARB to other output formats. At first, it will be limited to an ARB->Javascript translator, but an AGAL translator should be extremely easy to implement afterwards. This leads to all sorts of interesting usage possibilities, such as the ability to debug production shaders in javascript using a virtual GPU/debugger, even if the required level of performance is too great to use the library for software emulation. Also of interest will be the eventual integration of Flash, and for pure-flash developers/applications, the ability to compile GLSL down to AGAL without having to pay for or install external software might be very appealing.