[1.16.3] Larger FPS drop when using fog in Mahou Tsukai - All The Mods 6
stepsword opened this issue ยท 6 comments
Description of the issue:
(I am the Mahou Tsukai Dev).
So, I have recently added a particle with a shader on it, rendered in RenderWorldLastEvent, and spawn a bunch of these. A user reported that in ATM6, this particle reduces the FPS to the point where its unplayable, even on high tier computers. On my machine, FPS goes from 200->90 in vanilla. After some testing in ATM6, I've found that most mods do not affect this drop at all, but when Immersive Engineering is installed, the FPS goes from 200->1. This can be replicated with just Mahou and IE in an instance.
Now, I intend to revisit the particle to hopefully make some optimization to it to reduce the 200->90 gap as much as possible, but ultimately 90 fps is still decently playable, so I'd like to resolve the issue that brings it from 90->1 if possible (since it would probably remain even after optimizing the particle).
Any ideas on what's going on here? I tried running visualvm to find anything obvious but nothing stuck out to me as significant resource drains.
By the way, this happens without using any blocks or items from Immersive Engineering in the world. Literally I can just start a new world and use "The Ripper"'s right click fog ability and it drops to 1FPS as long as IE is installed.
Versions & Modlist
IE: 1.16.3-4.1.0-124
Mahou Tsukai: 1.16.3-v1.24.0
Forge: 34.1.15
Corresponding ATM6 issue
As you can see it only shows my shader under CPU offenders when the ability is in use.
After I did the optimization I was planning, I go from 200->150fps when using it in vanilla, and 200->30-50fps with Immersive Engineering installed, which is at least playable, but it still seems like there's something there that's setting it off and it also doesn't seem like it's a lack of optimization on your part cause the profiler doesn't find anything of yours taking lots of time. It makes me think it may be something weird with OpenGL. You don't have any mixin/ASM type things right?
I mean, if it happens with IE just installed and none of its items present? Then you surely must have something show up in your profiler, right?
Can you provide some snapshots of your testing?
We do have a few small JS coremods (see src/main/resources/asm
), but none of those should be relevant here. The most likely candidates are various methods in ClientEventHandler
. You can also try disabling stencil in the IE config, I'm not sure how that interacts with your shader. As your mod doesn't seem to be open/visible source I can't really make any more accurate/targetted guesses.
I mean, we do have an event handler on RenderWorldLastEvent, but I don't see how that would tie in here, especially if it doesn't show up in the profiler...
Thanks for the help with this, I think I did try disabling IE stencil already, and I looked at RenderWorldLastEvent and didn't see anything obvious. It's possible there's some state I'm not resetting in my RenderWorldLastEvent that is causing this so I'll look into that more. Thanks again