Implement unlocked framerates via interpolation (#315)

* Disable waitForTick and waitBlanking

* Initial frame interpolation implementation

* Initial batch of speed fixes

* Fix Iron Boots

* Strip dead code once used for debugging

* Interpolate shadows

* Revert overzealous/redundant lookups

* Fix JUTFader

* Fix field map cursor

* Fix various particle effects

* Fix Midna when riding Wolf Link

* Fix title logo

* Title Logo 2: Electric Boogaloo

* Fixed grass and flowers

* "Unlock Framerate" config option (WIP)

* Wrap more things in TARGET_PC

* Finish wrapping things in TARGET_PC

* Missed one

* Disable dComIfGd_drawXluListInvisible when interpolating

---------

Co-authored-by: Luke Street <luke@street.dev>
This commit is contained in:
Irastris
2026-04-11 03:06:25 -04:00
committed by GitHub
parent 8c07d8bb8e
commit fb9178cac9
33 changed files with 1039 additions and 147 deletions
+8 -1
View File
@@ -4833,7 +4833,14 @@ inline void dComIfGd_drawXluListDark() {
inline void dComIfGd_drawXluListInvisible() {
ZoneScoped;
g_dComIfG_gameInfo.drawlist.drawXluListInvisible();
#ifdef TARGET_PC
// FIXME: Water rendering hack for frame interpolation
if (!dusk::getSettings().game.enableFrameInterpolation) {
#endif
g_dComIfG_gameInfo.drawlist.drawXluListInvisible();
#ifdef TARGET_PC
}
#endif
}
inline void dComIfGd_drawOpaListInvisible() {
+34
View File
@@ -0,0 +1,34 @@
#ifndef DUSK_FRAME_INTERP_H
#define DUSK_FRAME_INTERP_H
#include <dolphin/mtx.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#ifdef __cplusplus
namespace dusk {
namespace frame_interp {
void ensure_initialized();
void begin_record();
void end_record();
void interpolate(float step);
void notify_sim_tick_complete();
uint32_t begin_presentation_ui_pass();
uint32_t get_presentation_ui_advance_ticks();
void end_presentation_ui_pass();
void open_child(const void* key, int32_t id);
void close_child();
void record_final_mtx_raw(const Mtx* dest, const Mtx src);
bool lookup_replacement(const void* source, Mtx out);
bool lookup_concat_replacement(const void* lhs, const void* rhs, Mtx out);
} // namespace frame_interp
} // namespace dusk
#endif
#endif
+1
View File
@@ -53,6 +53,7 @@ struct UserSettings {
// Graphics
ConfigVar<bool> enableBloom;
ConfigVar<bool> useWaterProjectionOffset;
ConfigVar<bool> enableFrameInterpolation;
// Audio
ConfigVar<bool> noLowHpSound;
+1
View File
@@ -237,6 +237,7 @@ public:
static void* getZbufferTex() { return mZbufferTex; }
static void setFadeRate(f32 rate) { mFadeRate = rate; }
static f32 getFadeRate() { return mFadeRate; }
static f32 getFadeSpeed() { return mFadeSpeed; }
static bloom_c* getBloom() { return &m_bloom; }
static GXColor& getFadeColor() { return mFadeColor; }
static GXColor& getBackColor() { return mBackColor; }