You are viewing a potentially older version of this package. View all versions.
appxpy-DSPSwarmDrawFix-1.1.0 icon

DSPSwarmDrawFix

Fixes invisible Dyson Swarm sails on macOS (CrossOver/D3DMetal) by chunked indexed-triangle rendering

Date uploaded 6 days ago
Version 1.1.0
Download link appxpy-DSPSwarmDrawFix-1.1.0.zip
Downloads 17
Dependency string appxpy-DSPSwarmDrawFix-1.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

DSPSwarmDrawFix

Fixes the invisible Dyson Swarm when playing Dyson Sphere Program on macOS via CrossOver with the D3DMetal graphics backend.

The bug

The game draws far solar sails with a single Graphics.DrawProceduralNow(MeshTopology.Quads, sailCount * 12) call — hundreds of thousands of vertices in one draw. Direct3D 11 has no quad primitive, so Unity emulates quads with an internal index buffer, and D3DMetal silently drops this giant emulated draw call (small quad draws — sail bullets, power lines, warning icons — work fine, which is why only the swarm disappears).

The fix

Same shader, same GPU buffers, but the draw is issued as indexed triangles in chunks of 5460 sails (65,520 vertices, under the 16-bit index limit), using the shader's own instancing support (sailIndex = SV_InstanceID * _Stride + SV_VertexID / 12).

If the replacement ever fails (e.g. after a game update changes DysonSwarm.DrawPost), the mod logs an error and falls back to the vanilla draw path instead of breaking the game.

Harmless on other backends (DXVK/Windows) — it renders identically.

Changelog

  • 1.0.0 — initial release

CHANGELOG

1.1.0

  • Fix near solar sails (within 2.5 km) as well: DysonSwarm.DrawModel now draws all sails with a plain instanced call and an identity _NearIdBuffer, bypassing the append-buffer counter / CopyCount / indirect-args path that is unreliable on D3DMetal.

1.0.0

  • Initial release: far solar sails drawn as chunked indexed triangles (fixes invisible swarm on CrossOver/D3DMetal).