Log In  


Cart #userdata_tunnel-0 | 2024-03-15 | Embed ▽ | License: CC4-BY-NC-SA
15

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!

15


Cart #userdata_tunnel_moving_center-0 | 2024-03-15 | Embed ▽ | License: CC4-BY-NC-SA

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:

  1. I can't get userdata ops to work as I expect when u0 and u2 are not the same object.
  2. 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 of u0.
  3. 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]