Welcome to Fractal Forums

Fractal Software => Fragmentarium => Topic started by: laser blaster on April 18, 2013, 04:38:57 AM




Title: Is there any way to get double precision camera data?
Post by: laser blaster on April 18, 2013, 04:38:57 AM
First off, I just started using Fragmentarium, and it's amazing! Thank you so much for writing and sharing this awesome program, Syntopia!

Now, my question is, is there a way to get double precision camera data, or is it stored only in single precision? I ask because Syntopia has talked about using native and emulated doubles in Fragmentarium, which, IMO, would be of very limited use if the camera is still limited to single-precision.

If it's not already possible, then I might start looking into changing the source code... I have virtually no experience with C++ though. I had implemented double and quad-precision in the (really barebones) fractal explorer I wrote, but that was in Python.


Title: Re: Is there any way to get double precision camera data?
Post by: Syntopia on April 21, 2013, 09:56:09 PM
Thanks LB,

Internally, on the CPU side, Fragmentarium use double precision floats, but they are sent to the GPU in single-precision. (The Qt OpenGL wrapper does not support double-precision uniforms. The OpenGL API does, but I cannot test this since, since my GPU is not OpenGL 4.0 capable).

There is really no need to change the camera representation, though. The camera information is sent to the GPU as a center point, and a zoom factor. And the fractal calculation becomes unstable long before the single-precision limits of the zoom value is reached (a (normalised) SP float ranges from 10^-38 to 10^38 - and the Mandelbrot example breaks down already at zoom-factors of 10^14 for double precision calculations). Just make sure that the actual pixel coordinates are calculated using double precision.