Skip to content
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

Open
deathcap opened this issue May 27, 2014 · 3 comments
Open

Clipping plane tweaks #3

deathcap opened this issue May 27, 2014 · 3 comments

Comments

@deathcap
Copy link
Member

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:

screen shot 2014-05-26 at 5 31 34 pm

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).

@deathcap
Copy link
Member Author

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.

@mikolalysenko
Copy link
Member

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.

@mikolalysenko
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants