ID:2634781
 
When I went into this week, I was hoping it wouldn't be so one-note on the development front, but boy did that side project take a turn. The funny thing is that last week was supposed to be the week of the renderer, but instead it all came to a head this week, completely unlike the pimple on my nose.

Last time I mentioned I was going to check out the possibility of using texture atlases to reduce switching, which I believe is a major drag on the renderer. In the past, each different icon—and I mean each frame, not just each file—used its own separate texture. This has a lot of advantages from a simplicity standpoint, but GPUs don't like switching textures if they can avoid it. So the solution is to basically build a sprite sheet, but put a little padding around each icon with pixels copied from the icon, and that sheet is called a texture atlas.

In the process of doing this I learned that the simplicity I so valued before was also important to things like the alpha mask filter, so I had to make a lot of changes under the hood to how those things work, even to the point of altering the shaders. Hence some of the delay. I also discovered that my first pass at texture atlases was a bit naive and projects with too many different icon sizes would still be switching a lot.

So the big question now is: Was it worth it in the end? I'm honestly not sure. In my base test project I think this shaved about 30-40% of the time off of the render. No joke. That's a lot, but on a project like Eternia that inspired all of this, the changes are much, much harder to quantify and might not have done all that much. And yet, I don't regret this because it was an important change to make; this kind of change will allow me to move away from certain helper routines in the future should I choose to.

Anyway, it's all done now so I can return my focus to the other issues. I really want to get particles sewn up and start getting betas out there as soon as possible.

Thanks everyone who's contributed to BYOND, through Membership or on Patreon or SubscribeStar. Your support is everything and I'm always working to keep moving forward for you.

The Christmas season is almost here! Depending on who you ask, it may already be here. Get your wish lists together and be on your best behavior.
Even if it only shaves off 5% of processing off the renderer, I think it's worth it to make the change. Great stuff!

I'm definitely salivating over the particle stuff too.
I definitely want to play with particles once it's out in the wild as well. Best of luck as you work on it!