taby said:
For this setup, the analytical solution for the relativistic precession is 103.7 arcseconds per Earth century.
Why don't you use the analytical method if it exists? It would allow huge timesteps and high accuracy. It would prevent piling up hacks out of thin air until the result becomes close to correct?
taby said:
If you add bits 22, 23, and 24 together (e.g. 17.04 + 47.8 + 38.95) you get 103.79 arcseconds per Earth century. It works for many different initial speeds.
Proposal:
Use the 30 bits value, which does your math most accurately, and multiply the result by 103.7 / 35.06.
That's just as good, just as wrong, much faster, and works for many different speeds as well, i guess.
Conclusion:
Either the math you use probably isn't totally wrong, but also not yet totally right. Something is missing or wrong. Otherwise there would be no need to introduce hacks.
Or the error you get is actually just integration error. If so it would get smaller with smaller timesteps.
Use the math of the analytical solution to figure out the mistake / make a specialized integrator to minimize error.
taby said:
So, Joe, there is double precision in GLSL, but not OpenGL? In that case, can I pass in two float textures and then decode them in the shader as one double texture?
If there are no double texture formats, use shader storage buffers instead.
Textures are specialized image formats which the texture filtering HW can process.
SSBO is for general data which can be anything. It's usually the first choice for general purpose programs not working with images.