7 comments

[ 1.9 ms ] story [ 25.0 ms ] thread
It is neat and a nice implementation. Not sure I'd prefer it in place of real glsl, but I guess it can make shader writer more accessible for some that prefer JavaScript and have reduced use cases (because of the lack of flexibility that comes with using a translator like this.)
This is very cool. I'd have very serious concerns about using it in place of GLSL for a real project, but as a toy it's very cool. Seems to generate reasonable code as well.
That's a pretty neat hack, but I can't think of a worse language for shader programming than javascript :-) Dynamic typing and closures are useful in some domains... but I wouldn't want to run that sort of logic per-pixel on a display with 14 million pixels. Plus declaring the types ahead of time is really important. (highp vs. lowp, type sizes, etc.)
Since this drops directly into GLSL, it can't/doesn't support dynamic types or closures -- types are inferred into their GLSL equivalents.

I do agree that being able to control precision is important, and as of yet I'm not sure the best way to implement that.