Can distance material work on mobile?

Hi, I’m working on a mobile project.
I wanna create a material that can dynamically change color depend on the distance between camera and object.
First, I tested it in the editor, and it worked fine. Then I packaged it for Android, but it didn’t work the same as in editor. How to solve it?

Here’s the material.

Editor:

193059-editor.gif

Mobile:

193058-gearvr.gif

Try clamp value after devide from 0 to 1