Solve problem that user may move out of the range defined by the
Projection Matrix ,which is given by Cardboard API and is not
modifiable.
Merged codes from ShadingProgram with those from master