I need a script that inverts the alpha channel of a texture when I trigger it.
I have a energy pipeline on the floor. I use for this pipeline a transparent cutout shader.
when I activate a button the cutout slider will be animated and the gradient alpha will make the pipeline texture visible from point A going to point B.(looks like a river of energy that has started to flow to point B)
now if I deaktivate the button the cutout slider will be animated backwards and now it looks like the energy is running back from point B to point A… but I want that it looks like that no energy is comming from point A to point B. so I need to invert the alpha befor it animates the cutout slider.
please help. thx.