Skip to content

Mark sprites rendered through vanilla block model renderer as active #2254

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

Merged
merged 1 commit into from
Jan 10, 2024

Conversation

embeddedt
Copy link
Contributor

Sodium already includes an intrinsic code path for the simpler BlockModelRenderer#render method (the one which only loops over the quads and pipes them to a VertexConsumer), and that marks animated sprites as active. However, mods can call the other BlockModelRenderer#render method (the one which applies smooth lighting if needed) during immediate-mode rendering, and currently sprites rendered there are not detected. This PR fixes that.

Thanks to @19PHOBOSS98 for reporting this and noticing the second code path in BlockModelRenderer.

Copy link
Member

@jellysquid3 jellysquid3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Eventually we should replace this immediate-mode path with our own, but our current pipeline expects a terrain context and other stuff.

@jellysquid3 jellysquid3 merged commit 7b65e1d into CaffeineMC:dev Jan 10, 2024
@embeddedt embeddedt deleted the bmr-sprite branch February 18, 2024 00:04
IMS212 pushed a commit to IMS212/sodium-fabric that referenced this pull request Aug 6, 2024
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