Float double number of precision, their own original also do not care, but this big six months down unexpectedly found on this issue on a somersault.
Summarize down the Write renderer program:
1. Calculate the various transformation matrices on the CPU side as far as possible to double the type of data, and finally to the GPU and then to float.
2. If the numerical deviation is too large, it is recommended to convert to a local coordinate system for various calculations and eventually to the final coordinate system.
3. The high accuracy set in the vertex shader is really small compared to the medium performance, but the effect is good.
4. Sometimes passing the time variable to the shader will increase with the opening of the program, pay attention to the precision at this time, take the necessary measures, such as the method of taking surplus.
On the problem of floating-point precision