You are viewing a potentially older version of this package. View all versions.
Geostyx-GeosPerformance-0.1.0 icon

GeosPerformance

Higher frame rates in large factories

Date uploaded a day ago
Version 0.1.0
Download link Geostyx-GeosPerformance-0.1.0.zip
Downloads 30
Dependency string Geostyx-GeosPerformance-0.1.0

This mod requires the following mods to function

xiaoye97-BepInEx-5.4.17 icon
xiaoye97-BepInEx

BepInEx5.4.17 mod plugin framework, Mod框架

Preferred version: 5.4.17

README

GeosPerformance

Higher frame rates in large factories.

The game draws every belt and every item on a belt across the whole planet, several times each frame, even the ones behind the planet or off screen. GeosPerformance draws only the ones the camera can see, plus the ones whose shadows it can see. It also skips the shadows of items on belts more than about 120 m away, which are a few pixels across.

It also takes work off the game's main thread without changing what you see:

  • Buildings are culled on background threads, with the same rules the game uses, so batches with nothing in view are skipped instead of drawn empty.
  • Belts, items and buildings are drawn only into the shadow cascades their shadows reach.
  • The building under the mouse cursor is found without testing every collider nearby in full.
  • Building animations are uploaded to the GPU only after the factory has updated them.

On a 50,000-building planet with 88,000 items on belts, the frame rate went from 56–90 fps to 87–118 fps while the game runs, depending on the view (RTX 4070 Laptop, i7-13700HX, 1920×1280).

Settings

Settings are in BepInEx/config/com.geostyx.dsp.geosperformance.cfg and apply immediately.

Setting Default Effect
CullCargo true Draw only the items on belts that the camera can see.
CullBelts true Draw only the belts that the camera can see.
DistantItemShadows false Draw shadows of items on belts more than about 120 m away. Costs about 10 fps in a large factory.

Compatibility

A mod that changes how belts, items on belts or buildings are drawn may conflict. If belts or items stop showing, turn off CullBelts or CullCargo.

CHANGELOG

@repo/dsp-mod-geosperformance

0.1.0

Minor Changes

  • e6f0ee0: feat: cull buildings on worker threads and draw shadow casters only in the cascades they reach

    In live play the main thread, not the GPU, limited the frame rate once belts and items were culled.

    • Buildings: the game culls them with a compute shader and then submits every LOD batch in the camera, depth and shadow passes even when it is empty. GeosPerformance runs the same test on worker threads, matched instance for instance against the disassembled kernel, and skips empty batches. The job starts in Update, because the game draws buildings in LateUpdate before the camera moves for the frame.
    • Shadows: each caster's shadow is tested against Unity's cascade spheres, read back from the previous frame. Instances are ordered by the nearest cascade they reach, and light command buffers copy each cascade's instance count into the draw's arguments before the cascade and restore it afterwards. Unity still draws the casters, so bias and depth match. Batches whose shadows reach no cascade skip the shadow passes.
    • Mouse picking: a bounding-sphere test runs before each box raycast. The game tests every collider in the physics blocks under the cursor each tick, about 7,000 in this factory.
    • Animation and sign pools are uploaded up to their cursors and only after a tick, instead of in full every frame.
    • Belts are culled with cached bounding spheres. Belt, item and building culling run as separate worker jobs with one wake, and waiting for them never sleeps, since Sleep(1) can stall for over a millisecond under Wine.

    bench/ gains a fly path, GPU and main-thread frame timing, the game's own profiler totals, method timers, per-pass GPU timing and a check that compares the culled building lists against the game's shader.

  • 18a106a: feat: add GeosPerformance, which draws only the belts and items on belts that the camera can see

    The game draws every belt and every item on a belt across the planet in the camera pass and in all four shadow cascades. GeosPerformance culls them on worker threads against the camera view and the planet's horizon, keeps the ones whose sun shadows fall into view, and draws items more than about 120 m away (past the third shadow cascade) without shadows.

    Culling starts in Update, after the frame's simulation ticks, using the previous frame's camera widened by 1.5× its last turn and move. If the camera moves past that before rendering, the frame is culled again against the current camera.

    bench/ holds GeosPerfBench, a plugin and scripts that load a save copy in a separate r2modman profile, drive the camera along fixed paths, and record frame times.