I’m trying to render a voxel-based 3D world in Godot with pixel-perfect accuracy.
I’ve set the camera to a 45° downward angle and switched to an orthographic projection. To maintain a consistent ratio for the surfaces on the screen, I applied a Y-scale of sqrt(2.0) to the screen.
However, the result isn’t perfect—some lines appear misaligned.
to make it sable you need to move the z axis by sqrt of 2
I played around some more. The most important thing is the camera z movement. To get better pixels from the scene, just move the mesh around around so it sits better with the quantized camera.
Almost solved.
The key was using TextureRect instead of SubViewportContainer.
And I made the size of the SubViewport 8 times larger than the canvas. (2560x1018 in this case)
And I could achieve almost pixel-perfect by scaling down with TextureRect at nearest.