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

Flywheel is not supported #1414

Open
weegeeluigi opened this issue May 8, 2022 · 6 comments
Open

Flywheel is not supported #1414

weegeeluigi opened this issue May 8, 2022 · 6 comments
Labels
mod compatibility A compatibility issue with another mod performance This is an issue with overall performance, but may or may not be caused by an issue in Iris. version: 1.17+ This issue only affects Iris on 1.17+

Comments

@weegeeluigi
Copy link

What happened?

I've posted a large bug report on the create github already found here. Basically the moment shaders are enabled, there is a severe and unplayable FPS hit with the create mod running. I'm not sure where the fault lies so I'm opening something here as well. Getting close to the area with create entities completely pulverizes FPS and shows a large bottleneck as the GPU usages drops like a lead weight and 3D clocks don't get activated. I use complementary v4.4 (v4.3 has the same issue and I used that since world creation). Walking away from the create contraptions will slowly make the issue go away. With the same seed in a new world, just a small amount of create entities already substantially hit the FPS. I'm not sure if it's a system issue with just me, if this is expected with create and shaders (turning shadows off with small amounts of create entities helps in the test world, but in my real world it makes no difference at all). I'm attaching the screenshots and profiler zip here that I logged there as well as quoting what I wrote in the create github bug report:

The moment shaders are enabled, performance takes an unplayable hit resulting in an obvious bottleneck that is preventing GPU usage from increasing. The shaders I use are complementary v4.4, but I've tried a bunch of others and all result in the same problem. I've tried swapping to GravalVM and Open J9 to see if it's a Hotspot issue but nothing changed (in fact J9 made the performance plummet even more, down to literally a handful of frames). Originally I thought this world is just pushing the limits of contraptions and shaders, but upon creating a new test world with the same seed, dropping barely anything in it, the problems start to show themselves and the FPS drop is already significant.

I have 2 kelp farm based furnage engines. a windmill, and a bunch of automated belt lines for crushing, washing, blasting, mixing and pressing. Based on some of the nutty things I've seen people build, I'm not even convinced this is "a lot". My included screenshots will show the base (in the screenshots, the large, long building is empty). I have included screenshots with the RTSS overlay showing the issue both in the "real" in use world, and the test world, made with the same seed, to show the perf without create objects in it, and with, and what contraptions I have in the world. You'll have to pardon the need to zoom in to see anything since I play at 5120x1440 so the shots are "interesting".

When I start to walk away from the area, the screenshots will show the FPS bounce back up and eliminating the small hit printscreening does, I go back up to 70FPS and higher with shaders fully on blast once I've walked far enough away and am not looking towards the direction of the create setups. In the test world, standing still I can get up to 110+ FPS in the spot I took the screenshot in, but dropping just the schematic of the iron farm I use and the schematic of my furnace engine kelp farm setup already drops the FPS considerably, and the furnace engine setup isn't even running. Also moving close to the iron farm and walking already shows the clock speeds and usage starting to show the dropping behavior just with this stuff in it, standing still will bring it back up but moving immediately drops it. The FPS in this shot is already below 50.

Despite having the nvidia panel set to always go to max perf, and I even have nvidia inspector Multi display power saver running telling the system to forcefully activate 3D usage with X% usage, 15% to be exact to test, although I start to wonder if the driver is overriding this, there is something holding clocking back big time as the clocks stay locked at 1350mhz in the issue, despite the usage being reported at or above the 20% mark, and as I back away from the area they slowly start to crank up. Forcing the clocks locked at 2100mhz maybe add an FPS or two but the low clocks aren't the perf problem, they are just an interesting symptom of the bottleneck.

This is with build Creators-of-Create/Create#548 and Iris and sodium, and sodium's respective add-ons lithium, indium and phosphor, are all latest. I have gone back to the first working and least bug free of the early 1.18.2 builds and same thing happens with those. The log has nothing in it being spammed to indicate an issue so instead of I have launched the built in profiler and attached it here. Note, I have tested the idea that Iris and complementary's shadowing is the problem, but despite turning off real-time shadows, block and entity shadows fully off, no difference is made. Something is just really turning off Iris somewhere. Maybe my world is asking too much, maybe my system just has an issue. This funky FPS problem has left me scratching my head for I cannot pinpoint whose at fault, even if I make a test world and start blowing away contraptions the issue only really goes away fully once everything is gone.

Screenshots

RealWorldCloseEnoughProblemStarts
RealWorldFarEnoughProblemGone
RealWorldFurnaceEngine
RealWorldNoIssue
RealWorldProblemShows
RealWorldWalkingAwayStartsToFix
TestWorldCloseToContraptionUsageDrops
TestWorldIronFarmFurnaceAlreadyIssues
TestWorldNoCreate

Relevant log output

Link to profiled run

https://github.com/Fabricators-of-Create/Create/files/8647319/IrisCreatePerformance.zip

Minecraft Version

1.18.2

Iris Version

1.2.4

Sodium Version

sodium-fabric-mc1.18.2-0.4.1+build.15

Operating System

Windows 10

What is your GPU?

2080TI

Java Version

Java 17

Additional context

No response

@weegeeluigi weegeeluigi added the bug Something is implemented incorrectly label May 8, 2022
@coderbot16 coderbot16 added performance This is an issue with overall performance, but may or may not be caused by an issue in Iris. and removed bug Something is implemented incorrectly labels May 8, 2022
@coderbot16 coderbot16 added the version: 1.17+ This issue only affects Iris on 1.17+ label May 20, 2022
@coderbot16 coderbot16 added the mod compatibility A compatibility issue with another mod label Jul 11, 2022
@coderbot16
Copy link
Member

Create through Flywheel uses a highly-optimized rendering engine normally, but when Iris is enabled it has to use a slower fallback because this optimized rendering engine is not currently compatible with how Iris rendering works. On top of this, Iris also has to render the Create content twice using this slower fallback path with most shader packs to implement dynamic shadows.

It is possible to make it compatible, but this is quite difficult to implement and will require quite a sizable amount of preparatory work in Iris to be feasible.

@Mirsario
Copy link

Mirsario commented Aug 4, 2023

Installing this mod completely or almost completely fixes this:
https://www.curseforge.com/minecraft/mc-mods/iris-flywheel-compat

@KevinCCucumber
Copy link

Would this integration be possible as a standard?

@IMS212 IMS212 changed the title Massive performance hit enabling shaders with Create Refabricated Flywheel is not supported May 27, 2024
@IMS212 IMS212 pinned this issue May 27, 2024
@iTrooz
Copy link

iTrooz commented Jul 27, 2024

Could a member of the repository comment on the negative effects of this mod (https://www.curseforge.com/minecraft/mc-mods/iris-flywheel-compat) ?

Since this is not done by default, I assume that this has some downsides

@IMS212
Copy link
Member

IMS212 commented Jul 28, 2024

The negative effect is that it isn't supported by either team, and almost always breaks on a Create or Iris update. It's a brute force method that relies on both mods not changing at all.

@weegeeluigi
Copy link
Author

weegeeluigi commented Jul 28, 2024

Could a member of the repository comment on the negative effects of this mod (https://www.curseforge.com/minecraft/mc-mods/iris-flywheel-compat) ?

Since this is not done by default, I assume that this has some downsides

OP here, funny enough I never noticed this was pinned and forgot I even made this issue. I've used it, for the most part it works "fine". There are some glitches but it depends on the other mods you have installed and some shaders get merged improperly (the mod attempts to merge flywheel shader code with your actual shaders which can lead to bugs). The biggest bugs happen when you use PBR, regardless of implementation. Each update also breaks it, and given the difficult nature of what it tries to do by brute forcing shader code merging, it's not frequently updated either. It was just updated today, but the author doesn't post much so you don't really know what they are up to. If the mod gives you issues and breaks just stop using it. It's nothing against the dev, it's just a hard problem to solve and this mod is really a hacked workaround, what we need is a native backend to flywheel that is compatible with Iris.

The next releases of flyhweel (and sodium and iris) will begin to pave the way for a native solution to making things compatible. Someone will still need to go in and make the backend compatibility layers, but slowly it's getting there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mod compatibility A compatibility issue with another mod performance This is an issue with overall performance, but may or may not be caused by an issue in Iris. version: 1.17+ This issue only affects Iris on 1.17+
Projects
None yet
Development

No branches or pull requests

6 participants