News for hackers. Stuff that matters.
Re:Imagination GPUs now support OpenGL 4.6 by adastra22 on Friday July 07, 2023 @03:15AM (#36628301)
I'm confused by what you mean here by "software-rasterizer" when you are compiling it to run on the GPU. What do you think the graphics driver is doing when you program it with OpenGL? It's doing more or less the same thing under the hood.

I guess you can technically call that software rasterization now that GPUs are very programmable. But it's not how the word is usually used.

Re:Imagination GPUs now support OpenGL 4.6 by TazeTSchnitzel on Friday July 07, 2023 @03:45AM (#36628528)
GPUs have dedicated hardware for rasterisation. Using compute shaders to do it would be wasteful.
Re:Imagination GPUs now support OpenGL 4.6 by adastra22 on Friday July 07, 2023 @03:53AM (#36628580)
Not 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.
Re:Imagination GPUs now support OpenGL 4.6 by mschuetz on Friday July 07, 2023 @05:24PM (#36638518)
Nanite renders small triangles faster by avoiding the dedicated hardware and using compute, instead.
Re:Imagination GPUs now support OpenGL 4.6 by TazeTSchnitzel on Sunday July 09, 2023 @04:42AM (#36652780)
Micro-triangles are a special case and Nanite still uses the hardware for more reasonably sized triangles.
Re:Imagination GPUs now support OpenGL 4.6 by mschuetz on Sunday July 09, 2023 @09:24AM (#36654270)
"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_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.