I need to display objects with very big coordinates in my application.
When I try to display these objects, some visualization problems appear. When I move the camera, the geometry coordinates seems to change at each frame like each point is moving randomly.
It seems like precision problems.
I use only double precision values so it is a bit strange.
I use a lot of matrix transformations so maybe the problem comes from matrix operations. Matrix values are also defined with double precision.
Has someone already had this problem?
Double precision is not supported by hardware, so it all gets converted to floats anyway… I don’t have a solution for you though, only some value ideas. I would recalculate the positions relative to the camera on-the-fly so that they fit the single precision when drawing.
You can make small adjustments for it to support scaling.
You can also write closed form inverse math formulas for the inverse of projection matrices (ortho/perspective). They will most likely be more accurate than the generic operations used to invert an arbitrary 4x4 matrix because projection matrices are sparse.