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: Drastically reduce number of display lists when transporting fluids #45

Merged
merged 1 commit into from
May 20, 2024

Conversation

szuend
Copy link

@szuend szuend commented May 20, 2024

LogisticsNewPipeItemBoxRenderer has a display list cache for rendering fluids. Unfortunately there is a small bug/typo where a FluidStack is used as the key for lookup, but a FluidIdentifier is used for writing the cached display list array.

Essentially, the cache is unused and we create a fresh display list for every traveling liquid box in every frame.

To fix, we simply use the FluidIdentifier consistently. This should help with FPS in networks with lots of (vsibily) traveling fluids.

LogisticsNewPipeItemBoxRenderer has a display list cache for rendering
fluids. Unfortunately there is a small bug/typo where a `FluidStack`
is used as the key for lookup, but a `FluidIdentifier` is used for
writing the cached display list array.

Essentially, the cache is unused and we create a fresh display list
for every traveling liquid box in every frame.

To fix, we simply use the FluidIdentifier consistently. This should
help with FPS in networks with lots of (vsibily) traveling fluids.
@Dream-Master Dream-Master requested a review from a team May 20, 2024 10:38
@boubou19 boubou19 merged commit 3848737 into GTNewHorizons:master May 20, 2024
2 checks passed
Dream-Master pushed a commit that referenced this pull request May 20, 2024
…ids (#45)

LogisticsNewPipeItemBoxRenderer has a display list cache for rendering
fluids. Unfortunately there is a small bug/typo where a `FluidStack`
is used as the key for lookup, but a `FluidIdentifier` is used for
writing the cached display list array.

Essentially, the cache is unused and we create a fresh display list
for every traveling liquid box in every frame.

To fix, we simply use the FluidIdentifier consistently. This should
help with FPS in networks with lots of (vsibily) traveling fluids.

(cherry picked from commit 3848737)
@szuend szuend deleted the fix-fluid-render-cache branch May 20, 2024 17:08
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