Hacker News new | ask | show | jobs
by dahart 678 days ago
You might be making some incorrect assumptions about what this article is describing. It’s not limited to a single polygon against a background.

Analytic integration is always superior to multisampling, assuming the same choice of filter, and as long as the analytic integration is correct. Your comment is making an assumption that the analytic integration is incorrect in the presence of multiple polygons. This isn’t true though, the article is using multiple polygons, though the demo is limited in multiple ways for simplicity, it doesn’t appear to handle any arbitrary situation.

The limitations of the demo (whether it handles overlapping polygons, stitched meshes, textures, etc.) does not have any bearing on the conceptual point that computing the pixel analytically is better than taking multiple point samples. GPUs use multisampling because it’s easy and finite to compute, not because it’s higher quality. Multisampling is lower quality than analytic, but it’s far, far easier to productize, and it’s good enough for most things (especially games).

1 comments

This is correct! My CPU implementation of this code can handle the overlapping polygons / meshes / textures. https://phetsims.github.io/alpenglow/#depthSort (takes forever to load, sorry!) is an example of using the analytic approach to render a phong-shaded teapot, where it splits things into adjacent but non-overlapping polygons (from a source of VERY overlapping polygons).