diff options
Diffstat (limited to 'apps/fparkan-game/src/camera_capture.rs')
| -rw-r--r-- | apps/fparkan-game/src/camera_capture.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/apps/fparkan-game/src/camera_capture.rs b/apps/fparkan-game/src/camera_capture.rs index 9862546..bc16807 100644 --- a/apps/fparkan-game/src/camera_capture.rs +++ b/apps/fparkan-game/src/camera_capture.rs @@ -15,10 +15,17 @@ pub(super) struct LegacyCameraCapture { pub(super) far_plane: f32, pub(super) field_of_view_radians: f32, pub(super) atmosphere_seconds: Option<f32>, + pub(super) sky_uv_clock: Option<SkyUvClock>, pub(super) geometry_projection: Option<GeometryProjection>, } #[derive(Clone, Debug, Deserialize, PartialEq)] +pub(super) struct SkyUvClock { + pub(super) verified: bool, + pub(super) elapsed_milliseconds: u32, +} + +#[derive(Clone, Debug, Deserialize, PartialEq)] pub(super) struct GeometryProjection { verified: bool, viewport: [i32; 4], @@ -118,6 +125,9 @@ pub(super) fn load_legacy_camera_capture( if capture.geometry_projection.is_none() { eprintln!("render_coverage captured_projection_unverified=1 (capture has no geometry_projection; using the recorded camera boundary, which can clip nearby surfaces)"); } + if capture.sky_uv_clock.is_none() { + eprintln!("render_coverage captured_sky_phase_unverified=1 (capture has no sky UV clock; using replay elapsed time)"); + } Ok(capture) } @@ -144,6 +154,13 @@ pub(super) fn parse_legacy_camera_capture(bytes: &[u8]) -> Result<LegacyCameraCa return Err("legacy camera capture is marked render_input_usable=false".to_string()); } if capture + .sky_uv_clock + .as_ref() + .is_some_and(|clock| !clock.verified) + { + return Err("legacy camera sky UV clock is unverified".to_string()); + } + if capture .atmosphere_seconds .is_some_and(|seconds| !seconds.is_finite() || seconds < 0.0) { |
