Live data from Hacker News

AAA – Analytical Anti-Aliasing

blog.frost.kiwi

21–30 of 104 posts

Re: AAA – Analytical Anti-Aliasing

#22
post #8

Great write-up! Though a little caveat from my side, as I have written both 2D and 3D rendering engines. Let me tell you, they could not be more different. It is not just another dimension but completely different goals, use-cases and expectations. So instead of: > Everything we talked about extends to the 3D case as well. I would say the entire post is mostly about 3D, not 2D rendering. If you are curious about this…

Hey, i'm brainstorming for a 3d vector renderer in WebGPU on JS/TS and stumbled on your project [0] yesterday. (Thick) line drawing is especially interesting to me, since it's hard [1]. I also stumbled upon this [2] recently and then wondered if i could use that technique for every shape, by converting it to quadratic bezier curve segments. Do you think that's a path to follow? [0] https://github.com/Lichtso/contrast…

My implementation does:

- Implicit Curve Rendering (Loop-Blinn) and stencil geometry (tessellation-less) for filling

- Polygonization (with tangent space parameter distribution) of offset curves for stroking

> by converting it to quadratic bezier curve segments

Mathematically, the offset curve of a bezier curve is not a bezier curve of the same degree in the general case (exceptions are trivial cases like straight lines, circles and ellipses). Instead you get terrible high degree polynomials. You will have to approximate the offset curve anyway. I choose to use polygons (straight line segments), but you could also use splines (bezier segments), it is just overtly complex for little to no benefit IMO.

BTW, distance fields and offset curves are very similar. In fact the distance field is the set of all possible offsets of offset curves and the offset curves are the isolines on the distance field.

Here is a good summary of all the edge cases to think about in 2D rendering: https://www.slideshare.net/slideshow/22pathrender/12494534

About subpixel AA: Don't bother, LCDs are on the down trend.

Re: AAA – Analytical Anti-Aliasing

#23

Thanks for sharing! Author here, happy to answer any questions.

Fantastic article! I've been trying to figure out antialiasing for MSDF fonts, and have run across some claims:

1. antialiasing should be done in linear rgb space instead of srgb space [1] [2]

2. because of the lack of (1) for decades, fonts have been tweaked to compensate, so sometimes srgb is better [3] [4]

Do you have advice on linear vs srgb space antialiasing?

[1] https://www.puredevsoftware.com/blog/2019/01/22/sub-pixel-ga...

[2] http://hikogui.org/2022/10/24/the-trouble-with-anti-aliasing...

[3] https://news.ycombinator.com/item?id=12023985

[4] http://hikogui.org/2022/10/24/the-trouble-with-anti-aliasing...

Re: AAA – Analytical Anti-Aliasing

#25

Graphics programming analysis done using examples written in WebGL–genius. Hypertext that takes full advantage of the medium. This reminds me of something I'd see on https://pudding.cool/ , but it goes far more in depth than anything there. Absolutely fantastic article. I've been using MSAAx4 in my rendering engine for some time and only recently have considered switching to a FXAA / TAA implementation. I'm actually…

I really dislike TAA, especially on lower framerates. There's too much ghosting. I often switch it to a slower algorithm just so I don't get ghosting.

Re: AAA – Analytical Anti-Aliasing

#26
post #22

Earlier quoted context omitted.

Hey, i'm brainstorming for a 3d vector renderer in WebGPU on JS/TS and stumbled on your project [0] yesterday. (Thick) line drawing is especially interesting to me, since it's hard [1]. I also stumbled upon this [2] recently and then wondered if i could use that technique for every shape, by converting it to quadratic bezier curve segments. Do you think that's a path to follow? [0] https://github.com/Lichtso/contrast…

My implementation does: - Implicit Curve Rendering (Loop-Blinn) and stencil geometry (tessellation-less) for filling - Polygonization (with tangent space parameter distribution) of offset curves for stroking > by converting it to quadratic bezier curve segments Mathematically, the offset curve of a bezier curve is not a bezier curve of the same degree in the general case (exceptions are trivial cases like straight li…

Thank you very much for the hints! This rabbit hole gets deeper every day. :D

Re: AAA – Analytical Anti-Aliasing

#27
Tangent: my biggest problem with AA is something adjacent to it, which is that almost none of my games bother explain what the differences are between the different abbreviations available in the settings, half of which are completely unknown to me. Like, sure, I can look them up but a little bit of user-friendliness would be appreciated.

This article will probably help for future reference though!

Re: AAA – Analytical Anti-Aliasing

#28

Graphics programming analysis done using examples written in WebGL–genius. Hypertext that takes full advantage of the medium. This reminds me of something I'd see on https://pudding.cool/ , but it goes far more in depth than anything there. Absolutely fantastic article. I've been using MSAAx4 in my rendering engine for some time and only recently have considered switching to a FXAA / TAA implementation. I'm actually…

Steve Wittens also does a lot of these kinds of articles (math with WebGL-infused illustrations, etc.) at https://acko.net/

One of my favorites: https://acko.net/blog/how-to-fold-a-julia-fractal/. This helped me understand the relationship between trigonometric functions and complex numbers like nothing else I've ever seen.

Re: AAA – Analytical Anti-Aliasing

#29

Tangent: my biggest problem with AA is something adjacent to it, which is that almost none of my games bother explain what the differences are between the different abbreviations available in the settings, half of which are completely unknown to me. Like, sure, I can look them up but a little bit of user-friendliness would be appreciated. This article will probably help for future reference though!

Games/graphics are one of those domains with a lot of jargon for sure. If you don't want to be a wizard you can just mess with it and see what happens. I like how dolphin approaches this with extensive tooltips in the settings, but there's always going to be some implicit knowledge.

On a meta level - I feel like I've seen anti-acronym sentiment a lot recently. I feel like it's never been easier to look these things up. There's definitely levels of acronyms which are anti-learning or a kind of protectionism, but to my mind there are appropriate levels of it to use because you have to label concepts at a useful level to accomplish things, and graphics settings of a game definitely are on the reasonable side.

Re: AAA – Analytical Anti-Aliasing

#30

Thanks for sharing! Author here, happy to answer any questions.

How long did this take to write?

I have done a few live visualization based blog posts, and they take me ages to do. I kind of think that's the right idea though. There is so much content out there, taking longer to produce less content at a higher quality benefits everyone.

Post reply on HN