Can I subtract the current image from a previous one inside a material?

So you’re trying to acquire and retain pixel intensity change at certain threshold(s) in order to create an event from it? Basically tracking pixel intensity changes based on the object’s position in the scene (via how lighting and anything else influences/changes those pixels). Check this out:

Perhaps you can create a blendable at the threshold levels of pixel intensity change, and use a function to generate the event from it. The event would reference the image frame at t, and then calculate its difference to the image frame at t-1. Then use a variable to set the threshold at which that target event is recorded, and not only generated. Then output the recorded event to an array or some other data list or something. Probably not the most thorough or efficient idea, but it could be a start.