Hi. I had fun making my last plugin so I thought I'd try my hand at adding support for compute shaders to AppGameKit. You can download the initial release
here from GitHub.
The download for the release includes the binaries for Windows and Linux, as well as some documentation of the plugin commands and a couple of examples showing how the plugin can be used. In order to use the plugin, you'll need support for OpenGL 4.3 or better. As such, I'm not able to port the plugin to macOS as Apple ceased development of their OpenGL driver at OpenGL 4.1. If there's enough interest in this kind of functionality though, I will consider doing an OpenCL plugin which would be able to target macOS too.
In case you're not aware, compute shaders are general purpose stand alone shaders that are designed to make it easier to write arbitrary programs that run on the GPU. This can be particularly useful for games which can often benefit from the massive power of the GPU in ways beyond simply rendering graphics. For example computationally expensive tasks like AI, physics, audio processing, or collision detection could all be offloaded onto the GPU using compute shaders.
The most important part of the plugin is the ability to load (with Compute.LoadShader) and run (with Compute.RunShader) compute shaders from AppGameKit. As with normal AppGameKit shaders, you can set uniforms as inputs, and can bind AppGameKit images as inputs or outputs. In addition, the plugin adds the concept of a buffer, which can also be provided to the shader to operate on, using the buffer as either an input or an output. Buffers interact nicely with AppGameKit memblocks, so you can create buffers from memblock, memblocks from buffers, and copy data between the two.
This is just a first release, so of course I would be happy to hear any feedback or suggestions you have for the plugin. Hopefully you'll find it useful!