-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clipping plane tweaks #3
Comments
Changed defaults to 0.1 and 200 for now. Is there any disadvantage of setting the far plane too high? Wouldn't expect there to be anything that far in the distance to render, since distant chunks are removed. |
If the range of the z values is too big you can get flickering artefacts due to the loss of precision in the depth buffer. However for these ranges I doubt you would notice anything. |
Also another thing it could affect are frustum culling calculations. If you are using box-frustum, a farther clip plane will cause more objects to be drawn in the scene, which could impact performance. |
The default camera near and far planes are at 1.0 and 1000.0, respectively. Getting too close to a voxel causes visually noticeably clipping:
setting cameraNear to 0.1 improves this, but would be best to retest once collision physics (voxel-control/voxel-physical?) are added, since you can currently clip into a voxel. Also the cameraFar value of 1000.0 is unnecessarily high, 100.0 is more reasonable but it varies depending on game.chunkDistance (with https://github.com/deathcap/camera-debug can test 10 - 1000).
The text was updated successfully, but these errors were encountered: