>>1243922That's correct. NumPy definitely isn't to blame for the bad performance.
What is, is that I wrote the rendering code so it's done pixel by pixel.
That made it straight-forward to port it from GLSL.
I could probably rewrite so it uses NumPy array operations instead,
but the mipmapped texture sampling still has to happen pixel by pixel.
So by Ahmdal's law, it probably wouldn't be much faster. Maybe 2x at best?
In C, I still did it pixel by pixel, and yet it turned out to be really fast.
I also processed frames in parallel with fork() and got a further 6x speedup.
I think the only way I could improve upon this would be with SIMD operations.
I also got a small speedup from doing the motion blur pixel-wise, rather than frame-wise.
I believe it's because of cache locality.
Speaking of which, I could do motion blur faster by sampling the texture over a line instead of a point.
But I would have to implement anisotropic filtering, and I have yet to find good info on how to do that.