Closed raywzy closed 1 year ago
It's difficult to answer this without knowing about the use case you have. However, the performance of the op depends heavily on the number of silhouette pixels in the image, and one possible cause for low performance is that nvdiffrast thinks there are more silhouette pixels than there actually are.
If the antialiasing op seems slower than it should be, make sure that each logical vertex is referred to using the same vertex id in your triangle buffer. This lets nvdiffrast see which edges are joining two triangles and which are connected to just one triangle. If you duplicate the vertices so that each triangle uses unique vertex ids, every edge in the mesh will look like a silhouette edge to nvdiffrast, and there will be a lot of bogus silhouette pixels which decreases the performance.
I added this information to the documentation of antialias()
op. Thanks for bringing this up -- in hindsight this is an obvious pitfall and needs to be documented.
Thanks for the great work!
After testing, I found that current antialiasing step is slower than the rasterization (pytorch framework). Do we have any methods to further improve its efficiency?