Fabricators-of-Create / Create

[Fabric Mod] Building Tools and Aesthetic Technology
MIT License
827 stars 185 forks source link

Water wheels tanking performance once again #1445

Closed r1c05h37 closed 2 weeks ago

r1c05h37 commented 2 weeks ago

Describe the Bug

When using Iris shaders and placing a moderate amount of any water wheels, the fps drops DRASTICALLY I investigated the issue using spark, and it appears to be the render.SuperByteBuffer.renderInto() function It is used twice throughout the render thread, and causes the most performance drop off

Reproduction Steps

  1. Have Iris shaders, create fabric
  2. Turn on any shaders outside of default iris
  3. Place a moderate amount of water wheels (6 and up, depending on base pc performance)

Expected Result

Game not dropping to 15 fps from 90

Screenshots and Videos

Spark info Shaders, no wheels Shaders, wheels

Crash Report or Log

https://spark.lucko.me/RiCW0LFkoX

Operating System

Windows 11

Mod Version

0.5.1d

Minecraft Version

1.20.1

Other Mods

CC:C Bridge [1.6.2b-fabric] by Sammy L. Koch, Luke A. Hanssen Extra Mod Integrations [0.4.3+1.20.1] by Kneelawk EntityCulling-Fabric [1.6.2-mc1.20.1] by tr7zw Notes [1.20.1-2.1.0-fabric] by ChaosTheDude Extended Drawers [2.1.1+mc.1.20.1] by MattiDragon Iris [1.6.17] by coderbot, IMS212, Justsnoopy30, FoundationGames Create Slice & Dice [3.0.0] by possible_triangle TimeControl [1.6.0] by Unixkitty Enhanced Block Entities [0.9+1.20] by FoundationGames Lets Do Api [1.2.9] by Cristelknight, BaumeisterJO Chalk: Colorful-Addon [2.1.1+1.19.3] by DaFuqs, mortuusars KubeJS [2001.6.4-build.138] by LatvianModder Variant Barrels [3.4.1] by Xanthian EMI Trades [1.2.1+mc1.20.1] by Prismwork, Flamarine Create: Power Loader [1.4.2-mc1.20.1-fabric] by Lysine NetherPortalFix [13.0.1] by BlayTheNinth Chipped [3.0.4] by Alex Nijjar, Grimbop, Kekie6, ThatGravyBoat YUNG's Better Nether Fortresses [1.20-Fabric-2.0.6] by YUNGNICKYOUNG, Acarii Terralith [2.4.11] by Stardust Labs Visual Workbench [8.0.0] by Fuzs Variant Bookshelves [2.3.8] by Xanthian Gliders [1.1.5] by Suff99, TommyBricks, Lucraft Remove Terralith Intro Message [1.0] by Stardust, catter1 Crate Delight [1.4.3-1.20.1-fabric] by Axperty YUNG's Better Ocean Monuments [1.20-Fabric-3.0.4] by YUNGNICKYOUNG, Tera Visuality [0.7.1+1.20] by PinkGoosik Polymorph [0.49.1+1.20.1] by Illusive Soulworks EMI Enchanting [0.1.0+1.20.1] by fzzyhmstrs Sound Physics Remastered [1.20.1-1.3.1] by Sonic Ether, vlad2305m, Max Henkel AllTheTrims [3.4.2] by Bawnorton Mystical Oak Tree [1.20-1.11] by Mehvahdjukaar, Plantkillable ImmediatelyFast [1.2.10+1.20.4] by RK_01 JamLib [0.6.1+1.20.x] by Jamalam JsonEM [0.2.1+1.20] by FoundationGames Naturalist [4.0.3] by Starfish Studios CreativeCore [2.11.24] by CreativeMD, AriaFreeze Sodium Extra [0.5.4+mc1.20.1-build.115] by FlashyReese Do a Barrel Roll [3.5.4+1.20.1] by enjarai More Culling [1.20.4-0.22.1] by FX - PR0CESS MidnightLib [1.4.1] by Motschen, TeamMidnightDust Create Jetpack [4.1.1] by possible_triangle No Chat Reports [1.20.1-v2.2.2] by Aizistral Create [0.5.1-d-build.1161+mc1.20.1] by Fabricators of Create, Creators of Create Searchables [1.0.2] by Jaredlll08 Inventory Management [1.3.1] by Roundaround Variant Crafting Tables [6.4] by Xanthian CraterLib [1.1.1] by HypherionSA, Misha Athena [3.1.2] by ThatGravyBoat Status Effect Bars [1.0.3] by Neecko5b84 ThreadTweak [1.20.2-0.1.1] by getchoo, UltimateBoomer, fantahund Fabric Language Kotlin [1.10.19+kotlin.1.9.23] by FabricMC Xaero's World Map [1.38.1] by xaero96 YUNG's API [1.20-Fabric-4.0.4] by YUNGNICKYOUNG Crawl [0.12.0] by fewizz, McSkinnerOG, Chocohead Farmer's Knives [3.0.2] by ianm1647 Better Third Person [1.9.0] by Socolio, DreenDex Supplementaries [1.20-2.8.4] by MehVahdJukaar, Plantkillable InmisAddon [1.0.4] by Globox_Z, Pois1x Flight Assistant [2.1.0+mc1.20.x] by Octol1ttle, ToroCraft Cultural Delights Fabric [0.14.12+1.20.1] by MrSterner Satin [1.14.0] by Pyrofab Indium [1.0.30+mc1.20.4] by comp500 Expanded Delight [0.3.0.3] by ianm1647 Lithium [0.11.2] by JellySquid, 2No2Name Simple RPC [3.2.4] by HypherionMC Traveler's Titles [1.20-Fabric-4.0.2] by YUNGNICKYOUNG Presence Footsteps [1.9.2] by Hurricaaane (Ha3), Sollace Mod Menu [7.2.2] by Prospector, haykam821, TerraformersMC Jade [11.8.0] by Snownee SwitchCraft Peripherals [1.8.4] by SwitchCraft, Lemmmy Biome Makeover [1.20.1-1.11.4] by LASER KNIGHTS Better Combat [1.8.4+1.20.1] by Daedelus Impersonate [2.10.2] by Pyrofab YUNG's Better Mineshafts [1.20-Fabric-4.0.4] by YUNGNICKYOUNG Rhino [2001.2.2-build.18] by LatvianModder, Mozilla MmmMmmMmmMmm [1.20-1.8.14] by Mehvahdjukaar, Bonusboni, Gooigipunch, Plantkillable HT's TreeChop [0.19.0] by hammertater LazyDFU [0.1.3] by tuxed Dynamic FPS [3.4.2] by juliand665, LostLuma EMI Loot [0.6.5+1.20.1] by fzzyhmstrs, lxly9 (art) Pick Your Poison [1.1.1] by doctor4t, Pyrofab Sit! [1.1.3+1.20-1.20.1] by Oth3r EMIffect [1.1.2+mc1.20.1] by Prismwork YUNG's Better Witch Huts [1.20-Fabric-3.0.3] by YUNGNICKYOUNG, Acarii EMI Ores [0.3+1.20.1] by Abbie Simple Copper Pipes [1.16.1] by Lunade, Treetrain1 Sodium [0.5.8+mc1.20.1] by @jellysquid3 Bookshelf [20.1.9] by Darkhax Wired Redstone [0.7.7+1.20.1] by 2xsaiko, Kneelawk BCLib [3.0.14] by Quiqueck, paulevs, Bulldog83 Joy of Painting [NONE] by xerca Exposure [1.4.1] by Mortuusars Extended Cogwheels [2.1.0-1.20.1-0.5.1.c-fabric] by Rabbitminers Variant Chests [1.5] by Xanthian Create Deco [2.0.1-1.20.1-fabric] by Kayla, Talrey Architectury [9.2.14] by shedaniel Forge Config API Port [8.0.0] by Fuzs Fabric API [0.92.0+1.20.1] by FabricMC Vinery [1.4.11] by satisfy, Cristelknight, BaumeisterJO Resourceful Lib [2.1.23] by ThatGravyBoat, Epic_Oreo Create: Bells & Whistles [0.4.5] by sudolev 3d-Skin-Layers [1.6.2] by tr7zw Flan [1.20.1-1.9.1] by Flemmli97 Deeper Oceans [1.0.1a] by Apollo Jade Addons [5.2.3] by Snownee CICADA [0.6.2+1.20.1-and-below] by enjarai Brewin And Chewin [fabric-2.3.1+1.20.1] by MrSterner ProbeJS [6.0.0] by Prunoideae Cardinal Components API [5.2.2] by UpcraftLP, Pyrofab Runtime Resource Pack [0.8.1] by HalfOf2 Ducky Peripherals [1.20.1-1.3.1] by samsthenerd Light Emitting Diode [1.6.0] by magistermaks Show Me Your Skin! [1.8.0+1.20] by enjarai Balm [7.2.2] by BlayTheNinth The Bumblezone - Fabric [7.2.20+1.20.1-fabric] by TelepathicGrunt Chunks Fade In [1.0.5-1.20.1] by Koteinik AmbientSounds [5.3.9] by CreativeMD Tectonic [2.2.1] by Apollo NotEnoughAnimations [1.7.1] by tr7zw YUNG's Menu Tweaks [1.20.1-Fabric-1.0.2] by YUNGNICKYOUNG Obscure API [16] by Obscuria Create: Copycats+ [1.1.1-mc1.20.1-fabric] by Lysine, Bennyboy1695, Redcat_XVIII Tidal Towns [1.2] by joshieman06 Ocean's Delight [fabric-1.0.2-1.20] by Scouter ModernFix [5.15.0+mc1.20.1] by embeddedt Cloth Config v11 [11.1.118] by shedaniel Player Animator [1.0.2-rc1+1.20] by KosmX
Trinkets [3.7.2] by Emi, C4 AppleSkin [2.5.1+mc1.20] by squeek502 Moonlight [1.20-2.11.9] by MehVahdJukaar Chalk [2.2.0] by DaFuqs, mortuusars Create: Steam 'n' Rails [1.5.1+fabric-mc1.20.1] by The Railways Team Bad Packets [0.4.3] by deirn Magnum Torch [8.0.2] by Fuzs Better Nether [9.0.10] by quiqueck, paulevs (original author) Nether's Delight [1.0.0] by JustinPlayzz, StevenPlayzz, Umpaz, SoyTutta Emotecraft [2.2.7-b.build.50] by KosmX oωo [0.11.2+1.20] by glisco, BasiqueEvangelist, Noaaan Borderless Mining [1.1.8+1.20.1] by comp500 EMI [1.1.4+1.20.1+fabric] by Emi Nature's Compass [1.20.1-2.2.3-fabric] by ChaosTheDude Carry On [2.1.2.7] by Tschipp, Purplicious_Cow, cy4n Lootr [0.7.30.77] by Noobanidus, ZestyBlaze Overweight Farming [1.20.1-2.0.3-fabric] by Binome, MrSterner Xaero's Minimap [24.0.2] by xaero96 NoRecipeBook [2.4+1.20.1] by Grayray75 Not Enough Gamerules [1.5.3-release] by Max094_Reikeb CC: Tweaked [1.110.1] by Daniel Ratcliffe, Aaron Mills, SquidDev Mouse Tweaks [2.25] by Ivan Molodetskikh (YaLTeR) Variant Composters [2.4.1] by Xanthian Copper Hopper [0.5.1+1.20.1] by pcal.net FerriteCore [6.0.1] by malte0811 Puzzles Lib [8.1.18] by Fuzs You're in Grave Danger [2.0.0-beta.10] by b1n_ry Dramatic Doors [1.20.1-3.2.0] by FizzWare Amendments [1.20-1.1.11] by MehVahdJukaar Spice of Fabric [1.6.2+mc1.20.1] by Siphalor, CoolMineman, halotroop2288 Inmis [2.7.2-1.20.1] by Draylar Sneak Through Berries [8.0.0+1.20.1] by Trikzon Starlight [1.1.2+fabric.dbc156f] by Spottedleaf Just Enough Items [15.3.0.4] by mezz Falling Leaves [1.15.4] by Fourmisain, BrekiTomasson, RandomMcSomethin Let Me Despawn [1.2.0] by frikinjay Sakura Lib [1.5.3] by NoaSakurajin Patchouli [1.20.1-84-FABRIC] by Vazkii, williewillus Right Click Harvest [3.2.3+1.19.x-1.20.1-fabric] by Jamalam GeckoLib 4 [4.4.4] by Gecko, Eliot, AzureDoom, DerToaster, Tslat, Witixin Concurrent Chunk Management Engine [0.2.0+alpha.11.5] by RelativityMC, ishland YUNG's Better Strongholds [1.20-Fabric-4.0.3] by YUNGNICKYOUNG, Acarii YUNG's Better Desert Temples [1.20-Fabric-3.0.3] by YUNGNICKYOUNG, Tera EnchantmentDescriptions [17.0.14] by Darkhax YetAnotherConfigLib [3.2.2+1.20] by isXander Aquamirae [6] by Obscuria Couplings [1.9.5+1.20] by Chloe Dawn Blåhaj [0.3.2] by hibi, infoplayerstart, DaFuqs YUNG's Better Jungle Temples [1.20-Fabric-2.0.4] by YUNGNICKYOUNG, Tera Ice Boat Nerf [1.0.17] by supersaiyansubtlety Spyglass Improvements [1.4+mc1.20+fabric] by juancarloscp52 (Im_jc) Farmer's Delight [1.20.1-1.4.3] by Zifiv, vectorwing, StevenPlayzz, dopadream, orlouge, BarchamMal, AwesomeDude091 Handcrafted [3.0.6] by Alex Nijjar, Kekie6 Plushables [1.1.3] by Khazoda | June Kiwi Library [11.5.5] by Snownee Pehkui [3.7.12+1.14.4-1.20.4] by Virtuoel Reese's Sodium Options [1.7.2+mc1.20.1-build.101] by FlashyReese Bewitchment [1.20-7] by MoriyaShiine, cybercat5555 spark [1.10.53] by Luck Better End [4.0.11] by Quiqueck (code), paulevs (code & art), Bulldog83 (code & art), Edos (building), Yuki (art), Seaward (art), Firel (music) Spyglass Astronomy [1.0.10-mc1.20.0-1] by Nettakrim Automobility [0.4.2+1.20.1-fabric] by FoundationGames SimplePipeTest (Dependency Container) [0.11.0-pre.2] by AlexIIL Create: Sandpaper Overhaul [1.6+1.20.1] by Me! Controlling For Fabric [12.0.2] by Jaredlll08 Origins [1.10.0] by Apace

Additional Context

No response

TropheusJ commented 2 weeks ago

shaders disable Flywheel, which greatly improves the performance of Create's blocks.

drwoops commented 2 weeks ago

in order for flywheel to NOT be disabled when shaders are used, you need https://www.curseforge.com/minecraft/mc-mods/iris-flywheel-compat

r1c05h37 commented 2 weeks ago

you need [iris-flywheel-compat]

the mod doesn't work, sending into an infinite loop of loading the world, with this error:

[17:37:45] [Render thread/ERROR]: Error executing task on Client java.lang.NullPointerException: Cannot invoke "me.jellysquid.mods.sodium.client.render.chunk.RenderSectionManager.scheduleRebuild(int, int, int, boolean)" because "this.renderSectionManager" is null at me.jellysquid.mods.sodium.client.render.SodiumWorldRenderer.scheduleRebuildForChunk(SodiumWorldRenderer.java:461) ~[sodium-fabric-0.5.8+mc1.20.1.jar:?] at me.jellysquid.mods.sodium.client.render.SodiumWorldRenderer.scheduleRebuildForChunks(SodiumWorldRenderer.java:451) ~[sodium-fabric-0.5.8+mc1.20.1.jar:?] at me.jellysquid.mods.sodium.client.render.SodiumWorldRenderer.scheduleRebuildForBlockArea(SodiumWorldRenderer.java:441) ~[sodium-fabric-0.5.8+mc1.20.1.jar:?] at net.minecraft.class_761.method_18146(class_761.java:21546) ~[client-intermediary.jar:?] at net.minecraft.class_761.method_21596(class_761.java:2662) ~[client-intermediary.jar:?] at net.minecraft.class_638.method_16109(class_638.java:564) ~[client-intermediary.jar:?] at net.minecraft.class_1937.method_30092(class_1937.java:238) ~[client-intermediary.jar:?] at net.minecraft.class_638.method_41928(class_638.java:132) ~[client-intermediary.jar:?] at net.minecraft.class_634.method_11136(class_634.java:818) ~[client-intermediary.jar:?] at net.minecraft.class_2626.method_11310(class_2626.java:37) ~[client-intermediary.jar:?] at net.minecraft.class_2626.method_11054(class_2626.java:11) ~[client-intermediary.jar:?] at net.minecraft.class_2600.method_11072(class_2600.java:22) ~[client-intermediary.jar:?] at net.minecraft.class_1255.method_18859(class_1255.java:156) ~[client-intermediary.jar:?] at net.minecraft.class_4093.method_18859(class_4093.java:23) ~[client-intermediary.jar:?] at net.minecraft.class_1255.method_16075(class_1255.java:130) ~[client-intermediary.jar:?] at net.minecraft.class_1255.method_5383(class_1255.java:115) ~[client-intermediary.jar:?] at net.minecraft.class_310.method_1523(class_310.java:1175) ~[client-intermediary.jar:?] at net.minecraft.class_310.method_1514(class_310.java:802) ~[client-intermediary.jar:?] at net.minecraft.client.main.Main.main(Main.java:250) ~[minecraft-1.20.1-client.jar:?] at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470) ~[fabric-loader-0.15.7.jar:?] at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) ~[fabric-loader-0.15.7.jar:?] at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) ~[fabric-loader-0.15.7.jar:?] at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:87) ~[NewLaunch.jar:?] at org.prismlauncher.EntryPoint.listen(EntryPoint.java:129) ~[NewLaunch.jar:?] at org.prismlauncher.EntryPoint.main(EntryPoint.java:70) ~[NewLaunch.jar:?]

Which is obviously comical since sodium is dependency of iris

shaders disable Flywheel, which greatly improves the performance of Create's blocks.

Yes, I knew that, but the thing is that the option of flywheel to choose the optimisation method (off/batching/instancing) still affects performance, even though it shouldn't if it's off anyway. So I just assumed that iris already included the compat solution from [iris-flywheel-compat]. If it does not, why performance impact? If it does, why performance tanked?

IThundxr commented 1 week ago

That is due to their complex model, working as intended.

MrRedstoneToGo commented 1 week ago

The thing is, 10 cogwheels make up less than 1 fps, 10 Water wheels or big water wheels around 90!

MrRedstoneToGo commented 1 week ago

Are .obj files used as models for water wheels, large water wheels, blaze burners, crushing wheels, rails, flywheels, mechanical rollers and valve handles or do they have the official minecraft model files?

There are also .bbmodel files (blockbench) for the sticker, basin, steam whistle, steam engine and minecart couplings.