Schroedingers-Hat/jsphys — comment on commit 8407b84f015370694a456f01d250397371014616
File:  line 0
By Schroedingers-Hat:

Wrote a rather fast shader. Seems to be limited purely by pixel count on my system.
Slight rounding issue somewhere in my mathematics, triangles which have a nearly horizontal edge don't display properly. :/
@capnrefsmmat Using this we can do filled shapes and such in 2d (once I sort the rounding error).
Not only will it be much prettier, but it will be significantly faster (for detailed images at least. large fills are probably still faster). The bottle-neck once implemented should be aberration (which I can't see any way of improving algorithm-wise).
After this, the extension to 3d is trivial (most of the work from that end is already done).
I probably won't bother with 3d until other things can done (as it will require 3d models and which are kinda tedious to make, also there's no lighting so it'd be hard to see what's what).

Greyscale textures (with color data from the vertices) are another fairly easy extension, although it will slow it down a little (by roughly the ratio of how much slower javascript's multiply is than its add).