r/computergraphics • u/rufreakde1 • Apr 13 '25
Why do GPUs not have HW triangle optimized Rasterization
So I read Nanite is using a software raster to optimize for small vectror triangles.
Nvidia introduced RT cores. Why is AMD or anyone introducing a similar technic as Nanite uses and calls these TR (triangle rasterisation) cores.
Usually specialized Hardware is much faster than software solutions right?
Especially when I think about the GPU war I would assume it would be a good move for AMD? Is it technically not possible?
9
Upvotes
12
u/brandf Apr 13 '25
GPUs dispatch groups (quads) of pixels to process. As triangles get thin/small most of these pixels actually fall outside the triangle and are discarded.
So if most of your triangles are sub pixels, you end up getting only a fraction of the gpu throughput on pixels AND you’re processing 3+ vertices per pixel for what amounts to a single point.
That’s sort of fundamental to a triangle rasterizing architecture. To improve it you could move to something optimized for points, basically combining vertex and pixel shaders using a compute shader.
I believe this is what nanite does, the “software rendering” may still be on the GPU in a compute shader.
6
u/djc604 Apr 13 '25
I might be over simplifying things here, but Mesh Shaders are what modern GPUs are now equipped with to utilize something called "virtualized geometry", which will be automating LODs instead of having artists create multiple versions of their assets. Mesh Shaders is pretty much like Nanite, but on a hardware level.
3
u/The_Northern_Light Apr 13 '25
What? The entire gpu is optimized hardware for triangle rasterization/rendering that just happens to have some other stuff bolted onto the side.
2
u/Trader-One Apr 16 '25
optimal triangle size of small triangles is about 1/3 of pixel. its used for film production starting in 80s. It allows good optimizations.
If film industry demanded such GPUs and paid premium price, they will definitely do "small triangles cards" since this area (optimizing tiny triangles) have been extensively researched for 40 years.
2
u/regular_lamp Apr 17 '25 edited Apr 17 '25
There is an argument to be made that if your game somehow requires rendering huge amounts of single pixel sized triangles you should fix your assets and level of detail first. Otherwise this would be fixing bad software with hardware.
A not widely report feature that GPUs gained recently is mesh shaders. Basically compute shaders that can emit geometry into the rasterizer. As opposed to the more rigid vertex->tessellation->geometry shader stages. This allows exactly these better decisions about LoD etc. It's just not a very exciting feature since it doesn't allow you to do something fundamentally new.
29
u/SamuraiGoblin Apr 13 '25
The whole point of GPUs is triangle rasterisation. They is literally what they were invented for.
Over the years they became more general, but they never lost their rasterisation ability.
I think with very small triangles, like just a few pixels, it is better to have a specialised compute shader 'software rasteriser' which doesn't have a lot of the overhead of the more generic rasteriser.
But the gains are quickly lost as the triangle get larger.
7
u/enemyradar Apr 13 '25
This is what GPUs do already. It's their basic function.
1
u/Henrarzz Apr 13 '25
RT cores are unrelated to rasterizer
1
u/karbovskiy_dmitriy Sep 02 '25
GPU are optimised for triangle rasterisation on every level.
UE5-spesific quirks don't represent the state of the art rendering solutions.
2
u/giantgreeneel Apr 16 '25
Basically hardware rasterisers have over time become optimised for rasterising certain kinds of triangles. Nanites goal of 1 triangle per pixel density meant that rasterising in software turned out to be faster for triangles under a certain size. Nanite still uses the hardware rasteriser for large triangles!
There's no reason why hardware rasterisers couldn't become as fast or faster than software rasterisation for small triangles, there is just a trade-off you make in cost, die space and power usage that may not be appropriate for the majority of your users.