Hacker Newsnew | past | comments | ask | show | jobs | submit | mindbrix's commentslogin

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.


My email address is in every file ;-)


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.


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.


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.


Thanks. I couldn't really say without doing proper research.


I can't really answer that in detail yet. I suspect Rasterizer will be faster for complex scenes.


Thanks for the answer. You could make it render a rive asset for one-on-one comparison. ;)


Linear at present.


The core problem is path winding: https://en.wikipedia.org/wiki/Winding_number

Paths can be any size, and the problem is hard to parallelize. GPUs like stuff broken into small regular chunks.

TestFiles/Manchester_Union_Democrat_office_1877.svg is composed of a single huge path, which was a great torture test.


Slug is primarily designed for text rendering.

Vello is general purpose, like Rasterizer, but is based on GPU compute. Rasterizer uses the 'traditional' GPU pipeline. Performance numbers for both look very competitive, although Vello seems to have issues with GPU lock up at certain zoom scales. Rasterizer has been heavily tested with huge scenes at any scale.


Thank you very much for that concise explanation.


Stupid question: Why not use the hardware (fixed function) rasterizer inside the GPU? I guess that one is only optimized for triangles.


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.


Good question and answer ;-)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: