shiroroku / LootBeams

A Minecraft mod that adds colorful and customizable loot beams to dropped items!
MIT License
17 stars 30 forks source link

Mod causes significant 20 to 40% render performance drop #7

Open Kaleidio opened 2 years ago

Kaleidio commented 2 years ago

Not sure if optimization routes are available, but I go from 500 fps to 350 fps when an item is rendered. the lower number is with loot beams installed.

Kaleidio commented 1 year ago

Consider utilizing the renderers provided by Better Beacon Effects mod, which brings back the two dimensional texture pillar renderer for beacon beams, which is inherently an optimization. Would require compat code.

amoooooo commented 1 year ago

Over a year late to this but i recently found the problem. It was due to us not caching tooltips. The "beacon beams" we render are literally 4 raw GL quads, they are as optimized as can be.

Colin-J-Wood commented 1 year ago

Ah understood, that makes a lot of sense as well. Any chance it would get patched for 1.16.5?

amoooooo commented 1 year ago

eh if i get around to it. 1.16.5 is mostly a dead version for the most part so i've kind of given up with it lol

Kaleidio commented 1 year ago

sadly my modpack is stuck in 1.16.5 due to mod choice so I have no other reason to want this mod back.

JustAHuman-xD commented 1 year ago

I can look into backporting it into 1.16, already did it for 1.18

Kaleidio commented 1 year ago

Over a year late to this but i recently found the problem. It was due to us not caching tooltips. The "beacon beams" we render are literally 4 raw GL quads, they are as optimized as can be.

I understand you may not have interest in making compat for the renderer, but Better Beacon Effects is only 1 billboarded quad instead of 4.

amoooooo commented 1 year ago

no it isnt :D https://github.com/AlexDorian7/BetterBeaconEffects/blob/main/src/main/java/org/AlextronStudios/BetterBeaconEffects/OldBeaconTileEntityRender.java#L336 Look at how many times addQuad is called.

Kaleidio commented 1 year ago

Wow, that's surprising and very disappointing, the mod claims to be faster by using less quad calls on the curseforge page. They must be pulling off the classic effect by overlaying several quads instead of using a shader or texture...I'm uninstalling that mod