Hi everyone, I just want to make a shader like this.
(Gradient color based on how far is from camera)
However If I move the camera their color will change to same value at the same time like the gif below.

Is it because all the gameobjects shared a same material? Or do I choose the wrong node?
How to make them calculate the distance individually so that they could show different color at different distance?
Any advice would be appreciated.Thanks!