Re:WebAssembly Raytracer
by roywiggins on Saturday December 16, 2017 @05:27PM
(#15942567)
They're really fast even if you're sort of abusing them. Using fragment shaders to render entire scenes ("two triangle" style) probably wasn't what GPUs were built to do but the technique is awfully effective.
I've been working with GPUs for many years now and I still get surprised by their performance: some things turn out to be so bloody fast that I initially think that i must do something wrong. Other times, CPU implementations run circles around the GPU for no obvious reason. It's not intuitive and I still have a hard time wrapping my head around how fast these things are when they are at their best.
That kind of speed up isn't just a fluke here, it's pretty normal when your work aligns with what a GPU does best.