30 ms·
GPUs have dedicated hardware for rasterisation. Using compute shaders to do it would be wasteful.
by TazeTSchnitzel 3y ago
GPUs have dedicated hardware for rasterisation. Using compute shaders to do it would be wasteful.
- adastra22 3y agoNot necessarily. I'm working on an application that does exactly that, as we are rendering spheres. It ends up being much more efficient to rasterize the sphere in a combination of vertex and fragment shaders than to instantiate triangles.
- mschuetz 3y agoNanite renders small triangles faster by avoiding the dedicated hardware and using compute, instead.
- TazeTSchnitzel 3y agoMicro-triangles are a special case and Nanite still uses the hardware for more reasonably sized triangles.
- mschuetz 3y ago"Turns out we can beat the hardware with triangles much bigger than expected, far past micropoly. We software rasterize any clusters whos triangles are less than 32 pixels long." - https://advances.realtimerendering.com/s2021/Karis_Nanite_SIGGRAPH_Advances_2021_final.pdf https://advances.realtimerendering.com/s2021/Karis_Nanite_SI... It's not just micro-triangles, it works for triangles that span multiple pixels. And that's not a special case, that's the standard nowadays, except for games targeting very low-end devices. The dedicated hardware is nice for general-purpose support for arbitrary triangle-soups. But if you structure triangles a certain way and have a certain amount of density (which you want for modern games), you can specifically optimize for that and beat the general-purpose hardware rasterizer.