Teaching GPU programming in p5.js: now with compute shaders

Computer graphics education is in a weird place right now. The graphical capabilities of computers have expanded tremendously. At this point, it's also hard to talk about "graphical" capabilities: your Graphics Processing Unit (GPU) is no longer just pushing triangles onto the screen; it's a platform for general parallel programming. That's fantastic for increasing the possibilities! But with so much potentially to learn, how do you get started?

There is a lot of background context generally required in order to do any programming for the GPU, which makes it notoriously hard to get into. Rendering a triangle in Vulkan from scratch takes thousands of lines of code. This is a problem professors teaching computer graphics are currently grappling with. The playbook that seems to be solidifying is to not teach everything at first, and provide a template to work within that hides the bits that aren't initially relevant to the learning. As students learn more, the scaffolding can incrementally be pulled away, and they can become aware of those initially hidden parts. But, importantly, those hidden bits are not necessary for making immediate initial progress. This technique is called scaffolded learning.