2022 Developer Survey is open! Take survey.
2 of 2
edited title

How does anti-aliasing work, in general, for raytracing?

I am working on a raytracing Java program for fun. Here's one rendering: enter image description here

As you can see I still have to implement anti-aliasing (and there are huge geometry problems I won't get in to). How would one go about this in a raytracing program, where the renderer doesn't really render lines, but individual pixels? Is it even possible? For example, in a scanline rendering, you could apply anti-aliasing after filling a triangle. But in a raytraced rendering, the program works pixel-by-pixel, and doesn't know where object's edges are, or where to smooth things out.

Thanks