I have a plane object (a normal Unity 3D Plane, but it can be a complex floor in the future) and a cube is moving on the plane.
Currently, the plane is transparent. I want to make the plane opaque as the cube passes along it. But I want it to do this thing in an incremental way. I mean that as the cube passes through the area, the passed area becomes opaque.
I can do this by cutting the plane into smaller pieces and then, as the cube pass through each piece, I change its opacity using this logic. But dividing the plane into smaller chunks, each of which is a separate models, is not an efficient approach. Is there any way to do this using shaders or something else?