diff --git a/mm/2s2h/Enhancements/Graphics/MotionBlur.cpp b/mm/2s2h/Enhancements/Graphics/MotionBlur.cpp index 47aa7b1d0..4ffee97ed 100644 --- a/mm/2s2h/Enhancements/Graphics/MotionBlur.cpp +++ b/mm/2s2h/Enhancements/Graphics/MotionBlur.cpp @@ -14,6 +14,12 @@ void MotionBlur_RenderMenuOptions() { UIWidgets::CVarCombobox("Motion Blur Mode", "gEnhancements.Graphics.MotionBlur.Mode", motionBlurOptions, { .labelPosition = UIWidgets::LabelPosition::None, }); + + UIWidgets::CVarCheckbox( + "Interpolate", "gEnhancements.Graphics.MotionBlur.Interpolate", + { .tooltip = "Change motion blur capture to also happen on interpolated frames instead of only on game frames.\n" + "This notably reduces the overall motion blur strength but smooths out the trails." }); + if (CVarGetInteger("gEnhancements.Graphics.MotionBlur.Mode", 0) == 0) { UIWidgets::Checkbox("On/Off", (bool*)&R_MOTION_BLUR_ENABLED); if (R_MOTION_BLUR_ENABLED) { diff --git a/mm/src/code/z_play.c b/mm/src/code/z_play.c index 218531ebd..faf0e4279 100644 --- a/mm/src/code/z_play.c +++ b/mm/src/code/z_play.c @@ -117,9 +117,10 @@ void Play_DrawMotionBlur(PlayState* this) { } hasCopiedForFrame = false; + u8 interpolate = CVarGetInteger("gEnhancements.Graphics.MotionBlur.Interpolate", 0); - // 2S2H [Port] Copy framebuffer only once per game frame to exclude motion blur from interpolation - FB_CopyToFramebuffer(&gfx, 0, gBlurFrameBuffer, true, &hasCopiedForFrame); + // 2S2H [Port] Copy framebuffer, either once per game frame or all frames depending on interpolation setting + FB_CopyToFramebuffer(&gfx, 0, gBlurFrameBuffer, !interpolate, &hasCopiedForFrame); gSPEndDisplayList(gfx++);