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

[1.21.1] Feature: Add cached ber rendering pipeline #1816

Open
wants to merge 6 commits into
base: 1.21.1
Choose a base branch
from

Conversation

ZhuRuoLing
Copy link

@ZhuRuoLing ZhuRuoLing commented Jan 1, 2025

"cached" means the rendering pipeline will cache those verticles put by a custom renderer.

To use the rendering pipeline, users would implement the method IBlockEntityRendererExtension#renderCached , then notify the pipeline that there has something changed and the vertex cache need to be rebuilt.

The entire pipeline looks like some sort of chunk geometry, but users do not need to register the RenderTypes they used into a list.

This rendering pipeline can provide exceptional performance when rendering fixed vertices for BER and has great compatibility with other optimization mods like Embeddium and Sodium.

@neoforged-automation neoforged-automation bot added the 1.21.1 Targeted at Minecraft 1.21.1 label Jan 1, 2025
@CLAassistant
Copy link

CLAassistant commented Jan 1, 2025

CLA assistant check
All committers have signed the CLA.

@neoforged-pr-publishing
Copy link

  • Publish PR to GitHub Packages

@Technici4n
Copy link
Member

This is an interesting PR. We need to be careful not to accept something that will bring a large maintenance burden though.

Out of curiosity, how does this PR compare to static chunk geometry?

@ZhuRuoLing
Copy link
Author

This PR supports custom RenderTypes without registering them into RenderType#CHUNK_BUFFER_LAYERS, and using a custom RenderType in static chunk geometry might be very hard to implement under optimization mods like Sodium.

Besides these, it doesn't differ much from static chunk geometry, regardless of whether optimization mods are installed.

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

Successfully merging this pull request may close these issues.

3 participants