Recent submissions

Comment · 1 year ago
Ruffle is cool. From pixel inspecting the demo, it looks like they are using triangle fans with stencil & cover + MSAA, which was how I started!
Comment · 1 year ago
The depth buffer is used for opaque path interiors.
Comment · 1 year ago
My original target was iOS, so this was unavailable. I did experiment with their algorithm, but 4x MSAA was slow and had poor quality compared to Core Graphics, which was my reference.
Comment · 1 year ago
My email address is in every file ;-)
Comment · 1 year ago
Drawing cached renders in quads is how Core Animation works, but they do not scale well. You are ultimately limited by the CPU. Rasterizer enables a fully-animated canvas @ 60fps.
Comment · 1 year ago
The longer answer is that using straight-edged geometry to represent curves is a resolution-dependent operation, e.g. a full screen circle may need to be flattened to an 80-sided polygon.

Rasterizer can solve quadratic curves in the fragment shaders, which massively reduces the geometry needed for a scene.

Also, the native rasterizer only supports MSAA, which is inferior to reference analytic area AA.

Comment · 1 year ago
Good question and answer ;-)
Comment · 1 year ago
My reference renderer has been Core Graphics. If it looks like CG I assume it's OK - and if it's not OK I'm in good company ;-)

You can switch between CG and Rasterizer in the demo app using the 0 key to see the difference for yourself.

Comment · 1 year ago
Thanks, you imagine correctly ;-)

The current version uses Metal. I haven't even considered GPU ports yet, as my methodology is to get it working well on one platform first.

For single-pass SVG --> texture, a CPU approach would probably offer the lowest latency. For repeat passes, the GPU would probably win.

Comment · 1 year ago
Thanks. I couldn't really say without doing proper research.
Comment · 1 year ago
Comment · 1 year ago
The Rasterizer algorithm handles self-intersecting paths without issue. Removing them requires expensive and complex computation geometry.
Comment · 1 year ago
I can't really answer that in detail yet. I suspect Rasterizer will be faster for complex scenes.
Comment · 1 year ago
No magic, just 10+ years of experimentation and optimisation.
Comment · 1 year ago
Linear at present.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton