Move over layer A revealing layer B? Real, or faking it?

Suppose you had a cube that was moving over a solid green flat plain. Just beneath the solid green plain was a (hidden) solid red flat plain.

Is there any way anyone can think of to “erase” the green (top) plain to reveal the red plain as you moved across the top one?

Or is the best way to pull a Penn Teller … simply trail a flat red trail that never goes away behind the cube as if you were painting red, and only giving the illusion of revealing the plain underneath (also eliminating the need for the red plain).

Thoughts?

I wonder if you could use setpixels and paint into an alphamap? I dont know if _AlphaMap’s exposed…

Maybe something like that but using the mask shader on the wiki? So you setPixels as normal into the masked layer, thus the “adding” manifests as a “subtraction”?

not sure where to go beyond that

Aaron