Nice features of GLES3.1 - Printable Version +- Forums (http://www.scratchpadgames.net/forums) +-- Forum: Main Forums (http://www.scratchpadgames.net/forums/forumdisplay.php?fid=1) +--- Forum: OpenGLES3.1 Shaders (http://www.scratchpadgames.net/forums/forumdisplay.php?fid=17) +--- Thread: Nice features of GLES3.1 (/showthread.php?tid=331) |
Nice features of GLES3.1 - Brian Beuken - 02-04-2019 There are a number of small tweaks to 3.0, but overall its not a massive leap in the same way 3.0 was over 2.0. But there is something that is wonderful to play with and can really give us quite a boost. Compute Shaders Compute shaders basically let us pass over some of our more complex graphic tasks to the GPU to handle. Its not quite the same as multi core coding on CPU, since the CPU itself can't actually get hold of any of the info the compute shader produces (well yes it can, kinda, but only by grabbing buffers which is slooowww), but it is essentially letting us use redundant computing power in our GPU to release some work from our CPU instructing our GPU to do things. The compute shader is best used for repetitive graphical processes that don't need to be interrupted, and can run in the background creating different buffers or textures that your normal draw called shaders can make use of. While you are busy setting up your models, doing your physics, working out what AI is going to do, the GPU is idle, so we can make it work on creating buffers for things like shadows or lighting systems or even ambient colours to indicate passage of night and day. that can be stored in a GPU buffer ready for your shaders to work with when you are ready to execute a draw call. A short intro here. https://community.arm.com/graphics/b/blo...te-shaders Now sadly it has to be said, SBC GPU's are not great for this kind of work, they are often massivley overloaded just trying to render so don't have a huge capacity to run compute shaders as well, but as with all things SBC, a little used wisely can go a long way. RE: Nice features of GLES3.1 - jomoengineer - 02-09-2019 Nice! Thanks for sharing this. RE: Nice features of GLES3.1 - Brian Beuken - 05-22-2020 I was trying out some compute shaders on my Pi4 and stumbled on this post on the Rpi forums https://www.raspberrypi.org/forums/viewtopic.php?f=68&t=271863 which is a bit of a bummer, it doesn't stop computer shaders from working it just limits what they can read and write. It appears to be a mostly MESA driver issue, but since almost all our sbc's (exclusing Jetson) use MESA its pretty much universal... hopefully it will get resolved and we can really open up our compute shaders. |