Re: Towards Better Anti-aliasing

> If I have time, I'd like to prototype a JavaScript shim that renders
> SVG to WebGL to see how difficult it is. Obviously, I'd start with a
> very limited subset, such as rects.:)  I expect that certain things
> (such as filters, masking, pattern fills) may be more difficult to
> support without an intermediate immediate-mode graphics layer.

Those items are relatively easy in WebGL.

You'll want to use Canvas to render paths with curves in them.
You can just render them into a single color and upload them as textures.
Otherwise, you're going to have to do quite a bit of work to tesselate 
the paths.

You can save some time by re-using this library:
https://github.com/corbanbrook/webgl-2d

-Charles

Received on Tuesday, 1 November 2011 18:37:08 UTC