diff options
| author | quarrel07 <178681861+quarrel07@users.noreply.github.com> | 2026-07-26 22:00:47 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-07-26 23:00:47 -0600 |
| commit | 5b28472d477bab101dee2a0f469fe2aee2c58a01 (patch) | |
| tree | 1a368189c00196f1b0f5547f79473c8b313d0f0c /src/port | |
| parent | 24ac81951ea9b40a431b07a3c6395beab636cd97 (diff) | |
Fix garbage frame flash on cinematic camera cuts (#720)
* Fix garbage frame flash on cinematic camera cuts
Frame interpolation blended matrices across instant camera teleports in
attract/demo and post-race cameras, flashing 1-2 frames of sheared
geometry. Complete the existing camera-epoch mechanism: flag a cut in
func_80019890 when the camera moves >100 units, and have the
interpolator snap that frame to the new view instead of blending.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Retrigger CI (transient 502 downloading libogg from gitlab.xiph.org)
* Name the cinematic shot dispatcher
Review feedback on #720: func_80019890 -> camera_start_cinematic_shot.
It starts whichever shot D_80164680 has selected for a camera, dispatching
to the per-shot setup that teleports the camera to the shot's opening
position, which is why the cut detection lives there.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Apply fix to freecam
Added FrameInterpolation_DontInterpolateCamera calls to improve camera behavior when changing target players.
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>
Diffstat (limited to 'src/port')
| -rw-r--r-- | src/port/interpolation/FrameInterpolation.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/port/interpolation/FrameInterpolation.cpp b/src/port/interpolation/FrameInterpolation.cpp index 981ef3fa6..51d411c95 100644 --- a/src/port/interpolation/FrameInterpolation.cpp +++ b/src/port/interpolation/FrameInterpolation.cpp @@ -253,6 +253,7 @@ bool is_recording; vector<Path*> current_path; uint32_t camera_epoch; uint32_t previous_camera_epoch; +bool frame_had_camera_cut; Recording current_recording; Recording previous_recording; @@ -599,8 +600,10 @@ struct InterpolateCtx { unordered_map<Mtx*, MtxF> FrameInterpolation_Interpolate(float step) { InterpolateCtx ctx; - ctx.step = step; - ctx.w = 1.0f - step; + // On a camera cut, blending the two frames would mix unrelated views; + // snap every sub-frame to the new frame instead (hard cut, like hardware). + ctx.step = frame_had_camera_cut ? 1.0f : step; + ctx.w = 1.0f - ctx.step; ctx.interpolate_branch(&previous_recording.root_path, ¤t_recording.root_path); return ctx.mtx_replacements; } @@ -633,6 +636,7 @@ void FrameInterpolation_StartRecord(void) { } void FrameInterpolation_StopRecord(void) { + frame_had_camera_cut = camera_epoch != previous_camera_epoch; previous_camera_epoch = camera_epoch; is_recording = false; } |
