Hi everyone ! I’m making a Minecraft clone for fun and decided to add chunk génération. Everything is working perfectly, my chunks can render at trillion of blocka from the world origin and all except I got one problem. Starting to 1 million in coordinates, OpenGL starts tweaking and messing up the rendering. After doing some research, I got it. I’m using vec4 for my position instead of dvec4 with doubles. The more the number gets, the less precise is the float. So a double (which has 52 bits for that) is the right choice then !
Well… not really
Doubles are INSANELY slow. I got from 180 FPS with a 16x16 render distance by 20 FPS with the same render distance. I cannot use it at all. So can someone give me some tips to how I can increase the precision of matrices instead of using doubles and destroying performances ?
I tried many things like the “move the camera around the world and not the other way” method and it doesn’t seem to work. I tried the “use doubles in CPU but send results only float in the GPU”. But none of that increased the distance where things are cracking up.