Date: Mon, 23 May 2022 02:34:20 -0400
From: Luke Iannini
Subject: GPU Kit
After a last-mile marathon couple of weeks of non-stop clackin' GPU Kit is ready for preview. Since it's quite a lot of new stuff, it's probably worth giving it a trial run by running on Detroit's rules before merging the changes, and let me know if anything's not working!¹ This release is focused on shipping the new foundation, but there's still a lot to celebrate: • Hot-swappability up and down the stack. Every last resource is tracked by [acquiring a resource] and it works like a dream. We should be clear to swap rulebooks at will now!² • Incremental, fully demand-driven rendering. Not a "When the time is /t/" in sight! You can now generate complex static illuminations without impacting the continuous frame rate of the area. • Simultaneous multi-display presentation. All previous Realtalks became slower each time you added a display, because they rendered to each display serially and the V-Sync wait times would stack up. We now present images to all displays at once, which should also feel smoother when using a merged supporter. • Revamped appearances implementation — similarly, the old implementation rendered each appearance one at a time. We now render all appearances at once, and do it in the camera area instead of the main area. (This felt worth doing since appearances will be important for the next-up recognition work) • GPU images. You can create your own custom GPU renderers to render into an image, that then can be used like any other image in Realtalk. These power the new in-progress protein visualizers. (This was hacked into Vulkan Kit late last year, but is now first class) • Lua API. Porting everything to Functions was the most elegant way to implement GPU Kit, so as an excellent bonus we can now talk to the GPU from Lua. • GPU translator. GLSL is now a language, with the || prefix to inspire massive parallelism. Much more in store for this one, but getting all this out the door first! • Most importantly of all, fun! The previous Vulkan Kit was a big milestone in freeing us from the engine, but it was delicate and onerous to work on. GPU Kit is a breeze — I was able to implement the protein rendering prototype for Shawn in a single relaxing evening. (We also learned a bunch over the past couple years and Bret's been heroically adding C/systems features that make Realtalk a cozy home for closer-to-the-metal horsing around.) It feels "right", and that felt like a crucial prerequisite to have in place before going wild with recognizers, which are gonna change the whole possibility space of Realtalk! ¹On AMD NUCs it should Just Work to swap back and forth — on the new Nvidia NUCs (which I think only Shawn has one of) there was a "how was that ever working?" issue with display IDs containing characters that broke local memories so you will probably need to recalibrate! ²I've disabled the old Apriltags implementation for the moment to clear that barrier, soon to be replaced!