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

Rendering improvements #31

Merged
merged 3 commits into from
Nov 23, 2023
Merged

Conversation

jacobsjo
Copy link
Contributor

@jacobsjo jacobsjo commented Nov 22, 2023

Includes 2 rendering improvements. Both are activated by new BlockFlags and don't change anything unless these flags are set on some blocks - making them fully backwards compatible.

  1. Separate meshes for semi-transparent blocks: Blocks which have the semi_transparent flag set are added to a different mesh by the chunk builder. The getMeshes function returns the transparent meshes last, so that when rendering them in order, the transparent meshes are rendered last. This fixes the issue where solid blocks are not visible behind semi-transparent blocks.
  2. Self-culling: The self_culling flag controls weather a block culls faces of itself when placed next itself. For vanilla, ResourceManagers can set this to true for all blocks except leaves.

@misode
Copy link
Owner

misode commented Nov 23, 2023

Fabulous! (pun maybe intended)

Testing this, things look so much better already. Of course there are still problems when there are multiple translucent blocks behind each other, but even the game struggles with this.

Happy to merge and publish this now.

@misode misode merged commit ef9a328 into misode:main Nov 23, 2023
@jacobsjo jacobsjo deleted the rendering-improvements branch November 27, 2023 23:45
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

Successfully merging this pull request may close these issues.

2 participants