RaphiMC / ImmediatelyFast

Speed up immediate mode rendering in Minecraft
https://modrinth.com/mod/immediatelyfast
GNU Lesser General Public License v3.0
294 stars 21 forks source link

Poor performance on wynncraft beta with sodium #246

Closed Packsolite closed 4 months ago

Packsolite commented 4 months ago

Using ImmediatelyFast with sodium on the wynncraft beta yields significantly worse performance than compared to only sodium.

Screenshot F3 with Sodium + ImmediatelyFast image

Screenshot F3 with Sodium image

As you can see using ImmediatelyFast decreases fps while increasing gpu usage.

System Information

NVIDIA RTX 3070 Intel i7-9700k Windows 11

Game Information

Minecraft 1.20.2 Sodium 0.5.5 ImmediatelyFast 1.2.18 Java 21.0.1 (Oracle)

RaphiMC commented 4 months ago

Upload the game log and a list of steps to reproduce the issue. Additionally install the spark mod and run the /sparkc profiler start - - timeout 30 command with and without ImmediatelyFast and send the results. You should stand still and at the same place while the profiler is running

Packsolite commented 4 months ago

Log: https://pastebin.com/NkKWXaFa Reproduce:

  1. Install Sodium (and in 2. iteration ImmediatlyFast)
  2. Join beta.wynncraft.com
  3. Go to X=469 Y=67 Z=-1593 Yaw=0 Pitch=0
  4. Check fps with and without ImmediatlyFast

Profiler results: With IF: https://spark.lucko.me/dPrtHEVuSr Without IF: https://spark.lucko.me/vNUtKo212M

Edit: Seems like ImmediatlyFast handles the text_ and item_display entities worse than sodium. image

RaphiMC commented 4 months ago

Seems like the server is using text rendering in a weird way which causes too many draw calls to be made. As a temporary workaround you can enable experimental_disable_resource_pack_conflict_handling in the ImmediatelyFast config (.minecraft/config/immediatelyfast.json) which will fix the lag issue but may introduce visual issues

RaphiMC commented 4 months ago

I have optimized the handling of those characters the server is rendering. Can you disable experimental_disable_resource_pack_conflict_handling again and test with this version of ImmediatelyFast: https://upload.raphimc.net/file/4KsbKEXF66BJ8kOt/4gNd1YyPEJLPOlzD/ImmediatelyFast-Fabric-1.2.19-SNAPSHOT.zip

Packsolite commented 4 months ago

I have optimized the handling of those characters the server is rendering. Can you disable experimental_disable_resource_pack_conflict_handling again and test with this version of ImmediatelyFast: https://upload.raphimc.net/file/4KsbKEXF66BJ8kOt/4gNd1YyPEJLPOlzD/ImmediatelyFast-Fabric-1.2.19-SNAPSHOT.zip

Just tried it out and it's awesome. Fps drops are completly gone now. Great work! image