ImmediatelyFast
Madis0 opened this issue ยท 20 comments
CurseForge link
https://www.curseforge.com/minecraft/mc-mods/immediatelyfast
CurseForge Mod Distribution
Allowed
Modrinth link
https://modrinth.com/mod/immediatelyfast
Source/other link
https://github.com/RaphiMC/ImmediatelyFast
Mod file size
55.98 KB
License
(any other license)
What it does
The following parts of the immediate mode rendering code are optimized:
Entities
Block entities
Particles
Text rendering (partially)
GUIs (partially)
Why should it be in the modpack
Generally FPS should be 2x higher on busy servers and might also be up to 4x higher in cases where there are many entities.
Why shouldn't it be in the modpack
Not on CF, untested
Additional details
No response
Requested a CF upload in RaphiMC/ImmediatelyFast#3
HyperSoop tested it and got inconclusive results - we may not see much benefit with this because Iris already has these optimizations.
It's now on CurseForge: https://www.curseforge.com/minecraft/mc-mods/immediatelyfast
New feature coming to immediately-fast said to improve map rendering performance by 5x. (30fps -> 160fps) with a lot of maps.
https://discord.com/channels/507304429255393322/523251999899385875/1056949757924352000
Building a map atlas texture containing 1024 maps each to increase performance of map rendering. This improves performance by over 5 times on servers with billboards or many maps in item frames. (Improved FPS in this scene from 30 FPS to 160 FPS) This feature will be included in the next ImmediatelyFast release.
The image shows the test scene on the left (contains 3 large map billboards) and on the left the allocated textures which are used for rendering. In the after image there are only 2 big map atlas textures instead of the over 500 single map texture vanilla minecraft uses.
A new feature I also added to ImmediatelyFast: HUD/GUI performance improvements. This change is essentially batching various draw calls in the HUD/GUIs and thus increases performance on my system by around 40-50%. In contrast to Exordium is my implementation not too invasive to minecraft code and should pretty much work with most if not all mods. At the moment the following HUD elements are optimized: Chat, Scoreboard, Bossbars, DebugHud, SubtitlesHud, Hotbar, Health/Food bar, PlayerlistHud, status effect overlay.
Can you give 1.1.1 a try. You can download a testing version on my discord: https://discord.gg/dCzT9XHEWu in #if-general
I still can't really disable entity optimizations, as this is a side effect of my "Universal batching" which allows me to even improve stuff like Maps and HUD. Without that both can not work as they would not use my optimized rendering code path. You could make reports with the spark mod and send me them on my discord or here so I can look whats changing between the two runs. If you do that make sure to test on a multipayer server with a static/consistent scene. Singleplayer might cause too much variance because of the internal server. After starting let the game run a a minute or two to "warm up" before taking the meassurement using spark
A new feature I also added to ImmediatelyFast: HUD/GUI performance improvements. This change is essentially batching various draw calls in the HUD/GUIs and thus increases performance on my system by around 40-50%. In contrast to Exordium is my implementation not too invasive to minecraft code and should pretty much work with most if not all mods. At the moment the following HUD elements are optimized: Chat, Scoreboard, Bossbars, DebugHud, SubtitlesHud, Hotbar, Health/Food bar, PlayerlistHud, status effect overlay.
Are the different optimisations toggleable ?
Because it would help for testing specific optimisations
Making them toggleable doesn't make too much sense as they are supposed to all work together to increase FPS. Only having one of the list above won't make a huge (maybe even noticeable) difference. With HUD optimizations its the all the small improvements which add up quickly.
There is also not much point in testing specific optimizations, as the aren't user toggleable anyway. Testing the mod as a whole is the better approach because thats the experience a player would get as well
Making them toggleable doesn't make too much sense as they are supposed to all work together to increase FPS. Only having one of the list above won't make a huge (maybe even noticeable) difference. With HUD optimizations its the all the small improvements which add up quickly.
There is also not much point in testing specific optimizations, as the aren't user toggleable anyway. Testing the mod as a whole is the better approach because thats the experience a player would get as well
The thing is that before the addition of map and HUD improvements i tested the mod and it appeared to do worse, if i was able to toggle optimisation i could precisely determine what was problematic
+ If by example we find HUD optimisation to be good but entity one to be one we can only enable HUD by example
Given that the modpack contains Iris (Which as stated in the description of my mod) replaces Entity rendering with their own batching implementation. This causes ImmediatelyFast to simply not optimize Entity rendering (and not make it worse because that code won't even run because Iris replaced it as a whole). Disabling only parts of the overall optimizations (Under which all of those areas fall: Entities Block entities Particles Text rendering GUIs Immediate mode rendering of other mods) is not really feasable as it would make mod compatibility worse (Due to me having to change a lot of vanilla code to force it to run the unoptimized code path) and because I simply can't make settings for optimization of immediate mode rendering of other mods.
The Map and HUD optimizations can be argued with, but I don't see a real reason to make them toggleable, as those are pretty stable and don't have any drawbacks by being enabled. If you still think that adding configuration is necessary I can add it ofc. It just won't do all that much
well maybe it shoudn't make it worse but from what i had tried it did make it worse, we have a post dedicated to testing your mod and other people have found the same thing
you should come in our discord to see the results by yourself
https://discord.com/channels/859124104644788234/1026028924813181018/1040688986135474308
i'm gonna retry your mod tho
Given that the modpack contains Iris (Which as stated in the description of my mod) replaces Entity rendering with their own batching implementation. This causes ImmediatelyFast to simply not optimize Entity rendering (and not make it worse because that code won't even run because Iris replaced it as a whole). Disabling only parts of the overall optimizations (Under which all of those areas fall:
Entities
Block entities
Particles
Text rendering
GUIs
Immediate mode rendering of other mods)
is not really feasable as it would make mod compatibility worse (Due to me having to change a lot of vanilla code to force it to run the unoptimized code path) and because I simply can't make settings for optimization of immediate mode rendering of other mods.
The Map and HUD optimizations can be argued with, but I don't see a real reason to make them toggleable, as those are pretty stable and don't have any drawbacks by being enabled. If you still think that adding configuration is necessary I can add it ofc. It just won't do all that much
If you are going to retry keep in mind that the HUD changes are not yet published on Curse/Modrinth. You have to build it yourself from source (I will publish it today). All of the tests were with Iris installed (Which as I said defeats most of the purpose of the mod. I originally intended it to just be an Iris replacement, as Iris slows down other parts of the game by implementing the whole code for shaders, which it wasn't worth for me just for Entity batching). The test results on the discord channel are really inconclusive because of that. Some reported a 1-3 FPS increase while other report a 3 FPS drop. Thats all well in the margin of error between two runs. The HUD optimizations should make a noticeable difference (on the Hypixel lobby for example). If possible don't use the F3 screen for meassuring performance, thats just not that good because of how much render time the F3 screen itself takes. External tools don't have that overhead and thus show more accurate results
and so i just retested you mod in version 1.0.7 and 1.1.0 in FO
from my tests on hypixel skyblock lobby 1 with 80 players grouped in the hub
max / avg / min
1.1.0 :
48 / 43 / 40
1.0.7 :
45 / 42 /38
whitout :
52 / 46 / 41
what i think is that the map optimisation is clearly effective
but that the entity optimisation has some problem or smth which lead to result be less good than whitout your mod
that's why i'm asking for a toggle so we can benefit from your map optimisation but disable the entity ones
or at least better diagnostic what's making performance great or bad
If you are going to retry keep in mind that the HUD changes are not yet published on Curse/Modrinth. You have to build it yourself from source (I will publish it today). All of the tests were with Iris installed (Which as I said defeats most of the purpose of the mod. I originally intended it to just be an Iris replacement, as Iris slows down other parts of the game by implementing the whole code for shaders, which it wasn't worth for me just for Entity batching). The test results on the discord channel are really inconclusive because of that. Some reported a 1-3 FPS increase while other report a 3 FPS drop. Thats all well in the margin of error between two runs. The HUD optimizations should make a noticeable difference (on the Hypixel lobby for example). If possible don't use the F3 screen for meassuring performance, thats just not that good because of how much render time the F3 screen itself takes. External tools don't have that overhead and thus show more accurate results
1.1.1 is now released and has the HUD rendering optimizations. Those should be enough to negate and even outperform the small performance loss. Read the update mod description for more details
1.1.1 is now released and has the HUD rendering optimizations. Those should be enough to negate and even outperform the small performance loss. Read the update mod description for more details
Compensating the performance loss is OK but if actually could be entirely removed and compensated it could be even better
(i'll test and give you feedback and spark as you want tho)
As a said already multiple times: I can't simply remove the code thats responsible for that small performance loss when in combination with Iris. This code is the foundation on which the other optimizations build on. I could reproduce the performance loss on my system as well (2 FPS less for me when I install it together with Iris), so I don't need any spark reports anymore. But I feel like this is a very small issue considering its so small that it can be within the margin of error. Other times reports with Iris show +3 FPS for example. Thats also in margin of error and nothing special
My comparison data using Minecraft Benchmark v3 world:
https://docs.google.com/spreadsheets/d/1ol6HM8a0bIVUmzpBa9VENLQQZ-L3u5Yo_jDsFmL9YNY/edit?usp=sharing
Please retest with IF 1.1.7.
I have added some really nice optimizations in the latest build