fix(cloth): enable HOS_FPS_CLOTH_60 by default above 60 FPS (#2987) #3122

Merged
HumanBean merged 1 commit from cfw34683/Longshot:fix/2987-cloth-above-60fps into main 2026-12-04 00:56:59 +00:00
Contributor

Closes #2987

Summary

Promotes HOS_FPS_CLOTH_60 from an opt-in attempt switch to a kill switch (enabled by default via switch_on_or("HOS_FPS_CLOTH_60", true); HOS_FPS_CLOTH_60=0 restores every-frame solving).

  • game/crates/game-core/src/fixes/high_fps.rs (cloth_solve): Gates cloth.solve to at most 60 solves per second (on whole 60ths of the game clock) above a 60 FPS cap by default, since Havok cloth always steps by 1/60 s per solve and running every frame at ~130 FPS advances cloth physics >2x faster than real time.
  • gpu/vk/switches.def: Updated HOS_FPS_CLOTH_60 from attempt to kill and documented =0 behavior.
  • Added a 130 FPS unit test in the_cloth_solves_once_a_60th_and_every_job_of_a_frame_alike.

Testing

  • python -I -B tests/run_all.py --exact tests/test_switch_table.py: 1 passed, 0 failed, 0 skipped.
  • python -I scripts/dev.py cargo -- test -p game-core high_fps: blocked by an unrelated pre-existing compile error on main (6318f405) in builder/crates/build-core/src/sandbox_windows.rs:1654 (note_lines not found in scope).
  • Not yet tested in-game in the post-Ganondorf ending cutscenes at 130 FPS.
Closes #2987 ### Summary Promotes `HOS_FPS_CLOTH_60` from an opt-in `attempt` switch to a `kill` switch (enabled by default via `switch_on_or("HOS_FPS_CLOTH_60", true)`; `HOS_FPS_CLOTH_60=0` restores every-frame solving). - **`game/crates/game-core/src/fixes/high_fps.rs` (`cloth_solve`)**: Gates `cloth.solve` to at most 60 solves per second (on whole 60ths of the game clock) above a 60 FPS cap by default, since Havok cloth always steps by `1/60 s` per solve and running every frame at ~130 FPS advances cloth physics >2x faster than real time. - **`gpu/vk/switches.def`**: Updated `HOS_FPS_CLOTH_60` from `attempt` to `kill` and documented `=0` behavior. - Added a 130 FPS unit test in `the_cloth_solves_once_a_60th_and_every_job_of_a_frame_alike`. ### Testing - `python -I -B tests/run_all.py --exact tests/test_switch_table.py`: 1 passed, 0 failed, 0 skipped. - `python -I scripts/dev.py cargo -- test -p game-core high_fps`: blocked by an unrelated pre-existing compile error on `main` (`6318f405`) in `builder/crates/build-core/src/sandbox_windows.rs:1654` (`note_lines` not found in scope). - Not yet tested in-game in the post-Ganondorf ending cutscenes at 130 FPS.
fix(cloth): enable HOS_FPS_CLOTH_60 by default above 60 FPS (#2987)
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
934ab68266
Promotes HOS_FPS_CLOTH_60 from opt-in attempt to kill switch (default on via switch_on_or; HOS_FPS_CLOTH_60=0 restores every-frame solving). Because Havok cloth steps by 1/60 s per solve, solving every frame at ~130 FPS advances cloth physics >2x faster than real time and exaggerates hair and clothing sway.

Assisted-by: Antigravity
Member

Possibly related, for context:

  • PR #1628 fix(fps): Havok cloth keeps the clock above a 60 fps cap, solved at most 60 times a second (HOS_FPS_CLOTH_60=1, off by default) (#1485) — Earlier merged implementation of the same cloth-gating behavior; current PR changes its default.
Possibly related, for context: - PR #1628 fix(fps): Havok cloth keeps the clock above a 60 fps cap, solved at most 60 times a second (HOS_FPS_CLOTH_60=1, off by default) (#1485) — Earlier merged implementation of the same cloth-gating behavior; current PR changes its default.
cfw34683 force-pushed fix/2987-cloth-above-60fps from 934ab68266
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
to 9b143005ee
Some checks failed
CI / What the change needs (pull_request) Blocked by required conditions
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Blocked by required conditions
CI / Third-party parts and guide screenshots (pull_request) Blocked by required conditions
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Blocked by required conditions
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Blocked by required conditions
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
PR description / Title and description (pull_request_target) Failing after 6s
2026-12-03 23:51:23 +00:00
Compare
HumanBean deleted branch fix/2987-cloth-above-60fps 2026-12-04 00:56:59 +00:00
Some checks failed
CI / What the change needs (pull_request) Blocked by required conditions
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Blocked by required conditions
CI / Third-party parts and guide screenshots (pull_request) Blocked by required conditions
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Blocked by required conditions
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Blocked by required conditions
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
PR description / Title and description (pull_request_target) Failing after 6s
Some workflows are waiting to be reviewed.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!3122
No description provided.