Kostas Anagnostou Profile picture
Lead Rendering Engineer @WeArePlayground working on @Fable. DMs open for graphics questions or mentoring people who want to get in the industry. Views my own.

Aug 18, 2020, 6 tweets

Great question from DMs: "How bad are small triangles really"? Let me count the ways:

1) When a triangle goes pixel size it may miss the pixel centre and not get rasterised at all, wasting all the work done during vertex shading docs.microsoft.com/en-us/windows/… (1/6)

2) Even if it does get rasterised, since the GPU shades pixels in 2x2 quads, any work done for pixels in the quad not covered by the triangle will be wasted, leading to quad overshading. blog.selfshadow.com/publications/o…, blog.selfshadow.com/2012/11/12/cou… (2/6)

3) GPUs perform a coarse rasterisation pass to decide which (eg 8x8 pixel) tiles are touched by a triangle. Small tris that cover few pixels are wasting much of the tile. Thin and long triangles can have the same effect. g-truc.net/post-0662.html, fgiesen.wordpress.com/2011/07/06/a-t… (3/6)

4) Since the GPU can coarsely rasterise a limited number of tiles per clock (eg 1 or 2), small tris can become a bottleneck for that fixed function unit. g-truc.net/post-0662.html. The GPU processes tiles of pixels in many cases, the less each is covered by a tri the worse. (4/6)

5) Related to No 3, small triangles make depth buffer compression less effective. They also make Hierarchical Z buffer construction and testing less effective. developer.amd.com/wordpress/medi…, fgiesen.wordpress.com/2011/07/08/a-t… (5/6)

Forward renderers are in general more sensitive to triangle size but small triangles should be avoided in all typical renderers through a combination of mesh lodding and small primitive culling frostbite-wp-prd.s3.amazonaws.com/wp-content/upl… (6/6)

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling