Potential problems with big coordinates
Posted: Wed Feb 02, 2011 3:38 pm
I have a large procedural world and I've noticed that when I get very far from the origin point (like 1,000,000 units) seams start to appear between the terrain chunks. This is due to the unprecision of the float type I suppose and I'm confident the problem will be gone as soon as I rebuild Ogre with double precision.
But this got me thinking, are there any other issues with big coordinates? For example, since the GPU uses floating point, should I expect some inconsistencies with shaders when using big coordinates? Are there other side effects?
If there are problems, the obvious solution would be to keep the camera at the origin and move the world instead, but could this affect performance negatively? In other words, should it be faster to move the camera than to move the whole world or is Ogre totally relativistic in this sense and it doesn't care?
Sorry for the vague questions but I would like to settle whether to make the terrain static or sliding before my code gets more complex.
But this got me thinking, are there any other issues with big coordinates? For example, since the GPU uses floating point, should I expect some inconsistencies with shaders when using big coordinates? Are there other side effects?
If there are problems, the obvious solution would be to keep the camera at the origin and move the world instead, but could this affect performance negatively? In other words, should it be faster to move the camera than to move the whole world or is Ogre totally relativistic in this sense and it doesn't care?
Sorry for the vague questions but I would like to settle whether to make the terrain static or sliding before my code gets more complex.