Keep in mind that even if you have double-precision values in your app, the GPU rendering hardware is still single-precision. It's going to convert all your nice double-precision values back into single-precision.
Is there a double precision build I can download?
- Edited
Tomcat This is the article that disagrees with you:
Lol. The guy moved a scene that's several units big, 10000 units from the origin. That's a very naive bruteforce way to render it. If you plan to render a galaxy this way, not even quadruple precision will help you. Some form of coordinate localization approach should always be used with large spaces, and if you do it right the single precision will always be enough while player would still have the illusion that they deal with a huge continuum.
As I always say: don't do simulations in games, do illusions of simulations. It'll spare you much headache.
xyz Lol. The guy moved a scene that's several units big, 10000 units from the origin. That's a very naive bruteforce way to render it.
Even I realize this is imagery and a stretch to illustrate the problem.
As I always say: don't do simulations in games, do illusions of simulations.
The question is: where is the line between simulation and imitation? Calculating and showing are different tasks.
If it is possible to achieve double precision in the engine, why do need to avoid it so energetically?
- Edited
Tomcat If it is possible to achieve double precision in the engine, why do need to avoid it so energetically?
@Haystack Already said why. GPUs (means rendering) operate optimally in single precision. So rendering something that has big coordinates will always "fail". You need to translate it "near" origin for rendering. With sufficiently large distances you'll have the same problem with doubles as well. So a fully generalized solution is not to increase precision, but rather to localize your space representation. How to do it specifically may wary depending on the needs of your "simulation".
The problem really is not in precision. The problem is that people do not understand actual hardware limitations. Today's relatively powerful hardware spoiled them to feel entitled to bruteforce their way out of absolutely everything.
- Edited
xyz The problem really is not in precision. The problem is that people do not understand actual hardware limitations.
Well, let people learn from their experiences. It's always more useful than outside advice. Warned about possible problems and difficulties, right? And then the person will decide whether to make up his own mind or listen to the wise.
"You can be absolutely right, but what's the point if the user is crying?"
- Edited
GPUs (means rendering) operate optimally in single precision.
Oh it's worse than that. Some parts of the 3d rendering pipeline hardware only work at single precision. Your vertex geometry will be transformed, clipped, culled, rasterized and depth-tested in single precision. There is no double-precision for these steps.
Modern GPUs can do double-precision in the shaders, but the fixed-function 3d pipeline is still fp32.