I am surprised I cannot find information about this from my searches.
I’m making a cubic voxel engine and use the camera clipping plane for view range. As my game doesn’t warrant having infinite terrain, I allow the user to specify a world size up to 2048x2048 in size. However, in the 1024-2048 units range, especially when the far clipping plane is between 100 and 200 units away, I see these lines:
These lines appear when moving the camera around.
I’ve been able to mitigate them to some degree by increasing the camera’s near clipping plane. However, I cannot increase it further because then walls will be clipped out when the player is up close to them.
Because this only happens at far enough units, I feel it may be related to floating point precision. I considered centering the world at origin so that the far edge of the world in the largest case would be 1024.
However, these issues still appear at the 1000+ unit range, and I may want to increase maximum world size even further in the future.
Therefore, my question is: is there anything I can do about this, or is it strictly a Unity limitation?
Thanks.
Edit: I suppose I could try something along the lines of moving the world such that the player stays at origin. Hoping there’s a better way before I look into that path!