Source

Thread

1/ @ID_AA_Carmack

It isn’t the point of this project, but looking at the triangulations made me think about some GPU optimization esoterica.

Everyone knows “triangle count” has an impact on performance. Graphics programmers also know that the ordering of the triangles can also make a significant difference, and integrate mesh optimization tools.

For the special case of planar figures like these, total triangle edge length can become the distinguishing performance characteristic. GPUs work with 2x2 blocks of pixels so they can generate derivatives for texture sampling and shaders. At triangle edges, they still usually have to do calculations for complete 2x2 blocks, regardless of whether 1,2,3, or 4 pixels in the block are actually needed. Long, skinny triangles can require over double the fragment shader invocations that area-maximizing triangles do.

Consider triangulating a circle: the obvious way is to make a single triangle fan, but you can reduce the total edge length by inscribing a polygon inside the circle and only fanning out from that to the circle. Slightly more vertex work, but less fragment work.

There probably isn’t any real world case where this would be a crucial optimization, but having an “optimization worldview” means always noticing the tradeoffs.

Branches: 2026-07-01-marcospereeira-dont-you-think-gpus-are-going-to-be-running-the, 2026-07-01-sallubroz-love-this-way-of-thinking-performance-often-comes, 2026-07-01-NiclasJ-john-have-you-thought-about-to-apply-game-engine, 2026-07-01-0xV0LYX-underrated-part-of-gpu-optimization-triangle, 2026-07-01-samiannoesis-could-this-graphic-triangle-building-in-gpus-has, 2026-07-01-samiannoesis-inscribing-the-polygon-first-reduces-fragment, 2026-07-01-i_mika_el-yeah-triangle-count-gets-all-the-attention-did, 2026-07-01-sleep_deprivado-its-just-how-big-is-the-cell-list-for-the-mesh, 2026-07-01-EasyAi_Tools-thats-a-fascinating-edge-case-on-edge-lengths-i, 2026-07-01-KURAOpenclaw-triangle-count-still-matters-more-than-most, 2026-07-01-ElonBaldMusk-i-dont-have-fable-yet-for-me-to-understand-this, 2026-07-01-mourner-feels-unreal-to-see-my-library-get-retweeted-by, 2026-07-01-optozorax-also-these-triangles-are-terrible-for-fem-its, 2026-07-01-ParkerRedford-or-or-or-calculate-r-2-x-2-y-2-z-2-for-infinite, 2026-07-01-HeroicReplicas-apply-this-granular-factual-analytical-excellent, 2026-07-01-HostOfMeta-would-depend-on-the-hardware-target-too-no-say, 2026-07-01-MaxGraey-btw-for-a-large-number-of-small-triangles-1-3, 2026-07-01-zeuxcg-notably-this-is-also-a-problem-in-ray-tracing, 2026-07-01-IHateZuckSoMuch-i-saw-some-video-about-those-pixel-quads-being-a, 2026-07-01-nam_dau_tu-c-ch-s-p-x-p-tam-gi-c-ph-ng-n-y-l-m-m-nh-nh-l-i-l, 2026-07-01-lep1c2l0-earcut-does-have-an-optional-triangle-area, 2026-07-01-MycelialClay-post-bug-fix-version-the-original-poster-put-up, 2026-07-01-AwokeKnowing-tldr-carmack-says-to-convex-hull-your-letters-and, 2026-07-01-evidype-for-ui-work-this-lesson-never-dies-total-work, 2026-07-01-RedaOuVT-there-probably-isnt-any-real-world-case-where, 2026-07-01-galateacyc-triangulation-algorithms-are-ridiculously-finicky, 2026-07-01-fedyac-this-is-a-topic-covered-by-an-old-blog-post-from, 2026-07-02-marcocc-triangle-ordering-matters-more-than-most-realize, 2026-07-02-gaborvalasek-the-problem-with-mwt-total-edge-length-minimizing, 2026-07-03-swengsbelike-but-theyre-cutting-out-circles-inside-circles, 2026-07-03-1louder-fyi-im-stealing-this-having-an-optimization, 2026-07-04-MakeTechPtyLtd-hey-john-what-happened-to-your-local-ai-rack-did, 2026-07-06-AIwithFuture-this-is-the-part-of-the-ai-story-that-gets

33 items under this folder.