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

Move particle vertex processing to the GPU #2086

Open
wants to merge 33 commits into
base: dev
Choose a base branch
from

Conversation

wahfl2
Copy link

@wahfl2 wahfl2 commented Sep 23, 2023

Currently, all particle vertices are processed and rotated on the CPU, before uploading them to a shader to be rendered. Sodium optimizes this slightly with more direct and explicit math operations for more optimization opportunities. However, a lot of vector math is still being done on the CPU.

This PR moves that processing (for most particles) to the GPU in a new shader. Specifically, this PR optimizes billboard particles that haven't overridden the buildGeometry method, which means they face the camera. This is the vast majority of particles, with only a few overrides in vanilla Minecraft (shrieker, elder guardian, etc). The normal particle rendering is still in place for the particles that are built some other way.

@IMS212 IMS212 changed the base branch from snapshot/dev to dev September 23, 2023 14:09
@wahfl2 wahfl2 marked this pull request as ready for review November 6, 2023 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-enhancement Type: Enhancement
Development

Successfully merging this pull request may close these issues.

None yet

3 participants