Runtime mesh painting using Render Targets

I’ve been following a tutorial on how to paint meshes at runtime (YouTube link). I’ve modified it to paint spheres instead, rather than complicated Skeleton Meshes, and it works rather well. There are however some more modifications I’d like to make, of which I’m having problems implementing, and like to ask for your help.

First, the tutorial uses the RGBA16f format on the Render Targets which, for my purposes, is a bit wasteful (if I understand them correctly). I’m using this mesh painting method to partially reveal the texture of a Sphere by “painting opacity” onto it. As such I only need one channel for opacity, ranging from 0 to 1, and would rather use the R8 format (red channel 8 bits) instead of all 4 channels and maybe double the resolution instead. However, any attempts to change format results in the painting feature breaking and changing the capture resolution doesn’t seem to affect the final result. Could someone take a look at what I’m doing wrong? The project can be downloaded in the video description of the YouTube video linked above.

Second, I want the paint to fade over time. I was planning to modify the Hit Render Target on Event Tick and remove Delta Seconds from each pixel every frame, but I wasn’t able to figure out how to do this. How can I modify a Render Target directly without using Scene Capture?

I’ve found a solution to my problems. The first issue arose from a bad implementation of the algorithm. The linked video uses two Render Targets whereas another source (link here) achieves the same effect using only one. I reimplemented the algorithm using a combination of the two sources and it now works much better. Exactly where the issue was I don’t know, but I can now change both format and resolution without problem.

For the second problem, I created a new material with a Texture2D and Scalar parameter as input, subtract the scalar from the texture, max it with 0 and then pass it to the output. I then input the Unwrap Render Target as the Texture2D and Delta Seconds as the Scalar and draw the output to the Unwrap Render Target using the “Draw Material To Render Target” function on Event Tick. With that, whatever’s painted fades over time.