Using RingBufferTextures to make a light painting effect

Light painting is like my TODO MVC app for learning new creative dev stuff, so I’m trying my hand at it in cables. The basic idea is pretty simple: save a buffer as a canvas, then composite a new frame on top of the previous. The goal is to simulate a long camera exposure, where the light accumulates on the screen.

I think I have the correct flow, using RingBufferTextures, but there are some errors in the console, and the thing doesn’t kick into gear until I tweak some setting on the RingBufferTextures node (e.g. toggling the order checkbox).

I think the issue might be related to the fact that the first frame doesn’t have anything to read from yet. Maybe I need to supply a fallback in that case, or tell it to write immediately on the first frame. There are some errors in the console, but they don’t give me much info about what I should do to fix them.

I tried using a ValidTexture node after the ArrayGetObject, but it didn’t change the behavior.

Anyway, I’m really enjoying cables so far!