frame interp camera cleanups

This commit is contained in:
Jasper St. Pierre
2026-04-19 02:25:00 -07:00
parent 341e97ba82
commit bb9a88d7dc
7 changed files with 84 additions and 57 deletions
+9 -3
View File
@@ -11009,6 +11009,15 @@ static int camera_execute(camera_process_class* i_this) {
i_this->mCamera.CalcTrimSize();
store(i_this);
#ifdef TARGET_PC
// record new camera for our sim frame
dusk::frame_interp::record_camera(i_this, get_camera_id(i_this));
// interpolate the view now so that this sim frame's view matrix matches what
// we'll be rendering with later
dusk::frame_interp::interp_view(&i_this->view);
#endif
view_setup(i_this);
return 1;
}
@@ -11077,9 +11086,6 @@ static int camera_draw(camera_process_class* i_this) {
C_MTXPerspective(process->view.projMtx, process->view.fovy, process->view.aspect, process->view.near_, process->view.far_);
mDoMtx_lookAt(process->view.viewMtx, &process->view.lookat.eye, &process->view.lookat.center,
&process->view.lookat.up, process->view.bank);
#ifdef TARGET_PC
dusk::frame_interp::record_camera(process, camera_id);
#endif
#if WIDESCREEN_SUPPORT
mDoGph_gInf_c::setWideZoomProjection(process->view.projMtx);