Here's a simple tunnel effect I did to test out doing pixel effects with userdata. Not super inspired, but it does run at 60fps at full resolution!
Added some more motion to the effect using strided userdata operations. My intuition was that this change should effectively be free from a performance perspective, but that hasn't worked out for a few reasons:
- I can't get userdata ops to work as I expect when
u0
andu2
are not the same object. - I'm not sure stride parameters allow you to "cut out" part of
u0
? It looks to me like you always have to iterate over each element ofu0
. - Strided ops seem slow - the strided copies here seem to be ~3x the cost of non-strided copies.
So as a result this cart only runs at 20fps, unlike the original, which runs at 60fps.
[Please log in to post a comment]