Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
mindbrix
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
1.
▲
by
mindbrix
1y 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!
2.
▲
by
mindbrix
1y ago
The depth buffer is used for opaque path interiors.
3.
▲
by
mindbrix
1y 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.
4.
▲
by
mindbrix
1y ago
My email address is in every file ;-)
5.
▲
by
mindbrix
1y 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.
6.
▲
by
mindbrix
1y 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 fragmen
7.
▲
by
mindbrix
1y ago
Good question and answer ;-)
8.
▲
by
mindbrix
1y 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 fo
9.
▲
by
mindbrix
1y 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 prob
10.
▲
by
mindbrix
1y ago
Thanks. I couldn't really say without doing proper research.
11.
▲
by
mindbrix
1y ago
Rasterizer excels at animation and complex scenes, e.g. 2D CAD documents. The original inspiration was Flash, as I love innovative design tools. Flash 1.0 could easily be used by designers, but ultimately lost its way became a coder's
12.
▲
by
mindbrix
1y ago
The Rasterizer algorithm handles self-intersecting paths without issue. Removing them requires expensive and complex computation geometry.
13.
▲
by
mindbrix
1y ago
I can't really answer that in detail yet. I suspect Rasterizer will be faster for complex scenes.
14.
▲
by
mindbrix
1y ago
No magic, just 10+ years of experimentation and optimisation.
15.
▲
by
mindbrix
1y ago
Linear at present.
16.
▲
by
mindbrix
1y ago
The "traditional graphics pipeline" approach was chosen to maximise the platforms Rasterizer could run on, as GPU compute support at the time was patchy. Compute is now more universal, so Rasterizer could move that way. SDFs are e
17.
▲
by
mindbrix
1y ago
Winding numbers are easy to explain, but hard to compute efficiently: https://en.wikipedia.org/wiki/Winding_number
18.
▲
by
mindbrix
1y ago
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_
19.
▲
by
mindbrix
1y ago
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 Ve
20.
▲
by
mindbrix
1y ago
No. I'm hoping someone else will do that ;-)
21.
▲
by
mindbrix
1y ago
None of that yet. The underlying SVG library, nanosvg, is very simple with no text support. The first priority was to solve paths to pixels efficiently, including text (50,000 glyphs @ 60fps). Gradients will be added when time allows, as I
22.
▲
by
mindbrix
1y ago
Hi Steve. Yes, it is! 10+ years in the making.
23.
▲
by
mindbrix
1y ago
Thanks for the feedback. I will work on one.
24.
▲
Rasterizer: A GPU-accelerated 2D vector graphics engine in ~4k LOC
(github.com)
169 points
by
mindbrix
1y ago
|
56 comments
25.
▲
by
mindbrix
1y ago
I've been working on this problem on and off for over 10 years. AMA ;-)
26.
▲
by
mindbrix
1y ago
The WebGL antialiasing quality looks poor compared to the software renderer. It could be using MSAA instead of full analytical AA. I had to use Chrome to test it, as the viewer doesn't play on Safari. https://thorvg.github.i
27.
▲
by
mindbrix
6y ago
I'd like to humbly suggest that Rasterizer may have extended the state of the art of 2D GPU-accelerated rendering: https://twitter.com/Vector_GL/status/1214507005316128768
28.
▲
by
mindbrix
7y ago
Many thanks! Fixed.
29.
▲
Concentrichron: A clock and calendar made of concentric rings
(twitter.com)
184 points
by
mindbrix
7y ago
|
73 comments