Hi, I'm trying to use a compute shader for a true(ish) datamoshing effect. For the simulation to be somewhat accurate to how a keyframe corruption looks, I need a way to access a cumulatively previous frame. What I need is to, if necessary, render the exact same buffer to screen. Like, it should be a static image if I do nothing to it.
I tried getting the image from the shader with prevframe[view] = Image.create_from_data(size.x, size.y, false, Image.FORMAT_RGBAF, rd.texture_get_data(screentex, 0)), but that errors in Texture requires the 'RenderingDevice.TEXTURE_USAGE_CAN_COPY_FROM_BIT' to be set to be retrieved. and I'm not sure how to fix it, because I'm following the tutorial that's on the official compositor effect manual, and it's only dealing with the RID's of things, so I can't access the texture itself to set the correct bit? I'm not exactly sure how to do that.
I'll write all the pseudocode I'm trying in the next message, but it does error out.
Also, I don't know how to use a backbuffer copy in a shader like this.