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

Performance fixes #96

Closed
wants to merge 21 commits into from
Closed

Performance fixes #96

wants to merge 21 commits into from

Conversation

Goby56
Copy link
Owner

@Goby56 Goby56 commented Aug 18, 2024

Changes

  • Added bricks. Variable sized storage containers for wake nodes which should provide faster node retrievals and reduce drawing times as there are fewer quads rendered. This may fix issue Huge performance loss with last version (0.2.3+1.20.2) #41.
  • One quad rendered per brick, was originally one quad per node.
  • As the nodes are no longer rendered per block the correct light information while rendering can't be provided. The light color is, therefore, baked into the actual pixel colors which are calculated once per tick.
  • Every brick now has its texture storage which does use up a bit more memory than just having one texture. But this enables per tick coloring as opposed to per frame coloring which is much faster.
  • Also removed memory leak caused by texture pointers being allocated but not deallocated. Memory leak caused by the mod #89 This was when the textures was stored in each node (0.2.5)
  • Removed LODs as the implementation didn't provide any performance benefits.
  • Improved splashes at the front of the boat. The planes are now static for boats, have fixed splash clouds at the front and stationary clouds at paddle splashes.
  • Shader compatibilty has probably been changed due to the new lighting method. A slider in the wake appearance config tab allowing the user to manually fine tune the look has been added.

Goby56 added 19 commits June 27, 2024 09:05
but still some index errors
game doesnt immediately crash + some code timers for debugging

mesher produces around 30 quads for 100 wakes (could be better)

textures still doesnt render
fixed some rendering issues but something is seriously broken
Colored texture every tick which of course wouldnt work as it only overrided the texture from brick to brick. It was fast but wouldnt work. I actually have to retexture it for each quad each frame. Pretty slow.
- still random node spawns at 0,0
- drawing takes the longest, texturing quite fast
Trying rendering smaller bricks all at ones. Something hella weird is happening though. Existing minecraft textures are drawn, sometimes even screenshots!
added brick and wake node visualizations + some more debug timers
still some visual artifacts
need to remove light element of vertex builder i think
but i think it is acceptable. Essentialy, there's a slider to adjust the brightness of the wakes depending on what shaders you are using
but still cant figure out why nodes are placed at 0,0
@Goby56 Goby56 closed this Aug 18, 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.

1 participant