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

Fix accidental xray hack where you can mine downwards quickly and occasionally see through the blocks below #181

Open
stackotter opened this issue Aug 17, 2023 · 0 comments
Labels
bug Something isn't working rendering

Comments

@stackotter
Copy link
Owner

This issue is only visible very briefly (it quickly disappears as the chunk sections finish regenerating), but it's definitely noticeable.

I have a hunch that this issue is to do with the scheduling of chunk section mesh regeneration. When the block broken is at the bottom of a chunk section, it could be that the section containing the block is generated first and displayed before the section below is regenerated. And because of block face culling (faces between blocks aren't rendered) this causes the block below to be invisible for a frame before the section below is regenerated.

If this is the case, it should be able to be fixed by not committing a regenerated mesh to the WorldMesh before all other related chunk sections (from the same block update) are also finished regenerating. You'll have to update WorldMeshWorker so that getUpdatedMeshes doesn't return meshes which are still waiting on other meshes from the same block update. Feel free to ask me for guidance on the Discord server if you need help.

@stackotter stackotter added bug Something isn't working rendering labels Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working rendering
Projects
None yet
Development

No branches or pull requests

1 participant