IvanSanchez / Leaflet.MandelbrotGL

Renders the Mandelbrot set in a LeafletJS map using WebGL
13 stars 2 forks source link

Implement emulated high-precision floating point arithmetic #4

Open IvanSanchez opened 9 years ago

IvanSanchez commented 9 years ago

The current 32bit floating point arithmetic produces artifacts at aprox. zoom level 19.

It is possible to use emulated high-precision floating point arithmetic (both double and quadruple), as per https://www.thasler.com/blog/blog/glsl-part5. It should be possible to abstract arithmetic in the mandelbrot code and switch parts of the fragment shader in and out depending on the map's zoom level.

This would allow the render to stay pretty up to zoom level 48 or so.

IvanSanchez commented 9 years ago

I wonder if Leaflet itself will be able to handle zooming beyond level 32, due to the tile coordinates being a 32-bit integer.