I’ve been working on a top down 2D game for quite a while now. However, I came to a point where I need to write shaders for a particle and lighting system (see this GitHub - scarsty/SDL2-particles: A Particle System for SDL2 for a particle system solely using SDL and no shaders). As you might expect, the performance drawbacks are significant (up from 15% to 25% CPU for any of the example particle effects).
So here is the deal: I’m working on a Mac so OpenGl ain’t unfortunately no viable solution for the long run. How can I write and implement shaders into my game, preferably using Metal? Do I have to create a Metal context (as with OpenGL)? If yes, how do I do that, and how to I start from there?