May I ask what the cell edge length actually is at the 18th subdivision of a quadree face for a cube representing, say the size of earth?
Earth has 510,000,000km², one side is one 6th: 85,000,000km² divided by 418 is 0,0012km² or 1,237m² with a edge length of 35m
Still huge in my opinion.
The quadtree depth is at 18 that means that the smallest chunk is one 262144th of the original chunk in sidelength.
That's a subdivision size of about 24 metres, on the earth. Do you need to get that close in?
The 24m (or 35m) could be enough, (better would be a depth of 22 divisions) but i get imperfections already on depth of 14 which is definitely to big for me
The mantissa in a float is effectively stored with 24 bits of precision. At 18x subdivision you're left with 6 bits of precision, which isn't much - errors will be up to about 1/64th of the actual value.
If you need to get that close in and have the surface look smooth I'd suggest using double precision. That means you will probably to do at least some of the transformation work on the CPU because most GPUs don't handle doubles
...Use double precision?
I already use double precision. All calculations are one the CPU made with double precision. When I send the vertices to the vertexbuffer the're converted to 32bit float. Matrice transformations are on 32bit too.
Limiting factor is the graphicscard is working with 32bit float
. You could just give the GPU screen space coordinates. Alternatively move the origin dynamically so 0,0,0 is on the bit of the surface you're looking at - it's currently about 6 million metres away!
You might find http://randomascii.w...hat-in-a-float/ and the other articles in that series helpful too.
I tried that out (putting the top surface to (0,0,0), but it didn't helped. I already got the highest precision in range of -1 to 1.