You are viewing a potentially older version of this package. View all versions.
Scoops-LethalSponge-1.0.8 icon

LethalSponge

A performance and diagnosis suite focused on rendering and memory.

Date uploaded 9 hours ago
Version 1.0.8
Download link Scoops-LethalSponge-1.0.8.zip
Downloads 461
Dependency string Scoops-LethalSponge-1.0.8

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2100 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2100

README

Lethal Sponge

Have you ever thought to yourself "Why does a game that looks like this, run so poorly?"

Me too.

Sponge is a fully clientside Performance and Diagnosis suite mod focused on making sure that Lethal Company runs as well and consistently as possible, while also helping you troubleshoot your modlist and find potential problem mods.

What does it do?

Sponge is split into two categories: Cleanup and Investigation.

Sponge Cleanup are a number of patches I've written for lethal company that will increase the baseline FPS, reduce stutters, and allow you to customize your graphics settings to reduce processing power requirements.

Sponge Investigation is a set of console readouts that are aimed at helping you find out what mods (or base game objects) might be causing memory leaks or frame drops.

What does it ACTUALLY do to improve FPS???

Currently, Sponge has the following performance features:

  • A complete re-write of Lethal Company's main outline/posterization shader that cuts down on 1 draw call per object on screen.
  • A rework of how Lethal Company hooks into Unity's Input System that fixes various input lag issues, including one where input lag would increase every time you loaded/started a game.
  • Various base lethal company script fixes to patch memory leaks and unnecessary calculations.
  • A number of camera patches so that only the main player camera is rendering graphically intensive effects. Security cams/the map cam have had their FPS limited and extra (usually unnoticeable) graphical effects disabled.
  • Numerous graphics options that allow you to reduce the level of graphical effects, usually ones that Lethal Company has set unusually high by default.
  • A patch to make Lights in game no longer effect volumetric fog at infinite distances.
  • A daily run of UnloadUnusedObjects, which will clean up various objects that were loaded into memory by moons/dungeons/monsters/etc.

Sponge for Players

For the average player, Sponge is mostly drag-and-drop. The default settings should increase FPS without affecting visual quality in any noticeable way. There are extensive configs for customizing what Sponge changes, so if anything conflicts with another mod or changes your experience in a way you don't like, it can be disabled or altered. For players who need even more extreme FPS help, Sponge features config options to lower graphics settings even further.

Sponge for Developers/Modlist Curators

For more advanced users, Sponge has a Verbose Logging config that can be enabled. This will reduce performance slightly and increase loadtimes while active, so only enable it while troubleshooting. This mode will attempt to track every object in your game and what AssetBundle it originated from. Sponge will perform daily readouts (optional, they can be run on command too) telling you what mods are potentially leaking memory. There are chat commands, including /sponge modelcheck and /sponge texturecheck which will give you a summary of every actively rendering model/texture in your game and what the largest/most dense ones may be. Using /sponge help in game will give you a list of commands.

NOTE:

Sponge as a tool is meant to help you narrow down potential mods. To truly find the root of memory leaks and FPS issues I recommend using Unity's Profilers. Sponge can be inaccurate due to name-overlaps between mods, so always double check using more intensive profilers once you've narrowed things down.

Never use Sponge as a reason to harass mod developers. Small memory leaks are common, and Unity can be a confusing beast to work with. If you find a significant memory leak that is effecting your gameplay, be sure to submit a bug report politely and professionally.

Planned Features

These are subject to change:

  • Watching initial feedback.
  • Improvements to the presentation and readability of Sponge's Evaluation logs.
  • The ability to change graphics settings in game, and save personal graphics settings not tied to Bepin config.
  • More base lethal company fixes.

Feedback is welcome!

Graphics and Memory Leaks are tricky subjects, so while my testing group has seen great improvements with Sponge, the same may not be true for everyone. If Sponge effects your game in an adverse way, please let me know. Also if you know a place where base lethal company is doing something a little silly, let me know and I'll see about adding a fix for it to Sponge.

By nature of what it is doing, some features of Sponge may be incompatible with some mods. I haven't run into anything yet, but if you find a Sponge feature is disrupting another mod, let me know.

Known issues

  • VR may have issues, if so, try disabling Use custom shader and Fix input actions. Please send logs if you encounter VR errors since I cannot test VR myself.
  • The custom shader replacement is still in progress and is not 1:1 with base lethal company's look.

Credits

  • Myliaa: Testing help
  • Soap: Testing help
  • Scoops (me): code

CHANGELOG

[1.0.8]

  • Fixed lights with 0 base range having their fade distance set to 0 with changeLightFadeDistance enabled. Now there is a minimum fade distance of 5m.

[1.0.7]

  • Made the WIP shader the new default replacement. You can access the previous shader with useLegacyCustomShader, if you preferred it. For people who were using the WIP shader, make sure to re-enable useCustomShader.
  • Cleaned up the camera-finding methods.
  • Fixed a typo in reflectionAtlasSize description.

[1.0.6]

  • Many more changes to the WIP Shader, text on the monitor should be more readable. This is approaching "good enough" level for me now, and if there aren't any major issues before next update it will likely be graduating from WIP.
  • Added a new initial call to UnloadUnusedAssets upon reaching the main menu if unloadUnused is enabled.
  • Fixed the security camera monitor by the ship door not updating if the other monitors were not in view.

[1.0.5]

  • Added volumetricCompensation config in Rendering (on by default) that will modify light intensity and fog thickness to account for the changes in the custom shaders. This should match vanilla's look more closely, especially in regards to fog density.
  • Many changes to the WIP Shader, mainly fixing the color format and HSL calculations to fix artifacting.
  • Fixed minimalLogging doing the opposite of what it said. (adding logging when true, removing when false)
  • Fixed useWIPCustomShader requiring useCustomShader.

[1.0.4]

  • Added a new WIP shader (off by default, set using useWIPCustomShader) with more of that 'lethal company charm'. It's still not there yet, but this should be a little closer. It's disabled by default while I work out the visual stylings.
  • Added minimalLogging config under Investigation. This will disable the readout of how many objects were cleaned up/how many objects are loaded total, which may reduce the stutter when cleanup occurs on day rollover.
  • Fixed the interior camera using the exterior camera's framerate settings, which could cause it not to work if you had one set to limited framerate and the other not.
  • Moved InputActions initialization later, which should hopefully solve issues with mouselook not working when fixInputActions was enabled.
  • Removed /sponge shader chat command when useCustomShader is disabled, to avoid confusion.

[1.0.3]

  • Added a new chat command '/sponge shader' that will toggle between base lethal company's shader and sponge's replacement.
  • Added more values to reflectionAtlasSize (whoops, didn't realize I initially tested with LethalPerformance on and thought their default was LC default.)
  • Added config to set the security camera clip plane.
  • Added configs to disable the camera quality overrides for the Ship/Security/Map cameras.
  • Split the framerate configs for Ship/Security cameras.
  • Changed camera fps configs so that if they are set to 0 the cameras will run at full framerate.
  • Reworked Lethal Company's ManualCameraRenderer fps limiting to be more performant (Thanks Zagster)
  • Fixed a compatibility issue with ModelReplacementAPI

[1.0.2]

  • Reworked custom pass to work better with additional cameras, fixes compatibility issues with Imperium and TooManyEmotes.
  • Fixed NRE when Remove posterization shader was disabled but Use custom shader was not.

[1.0.1]

  • Reworked how the new Posterization shader is implemented to avoid compatibility errors with Diversity.

[1.0.0]

  • Initial Release.