From 284a5cad50c8645a9b086ee9cd91a4023ceab41c Mon Sep 17 00:00:00 2001 From: chazmm Date: Tue, 8 Sep 2026 23:55:01 +0100 Subject: [PATCH] Verify supplied v15 custom map scene preparation and document format support --- crates/skate-game/src/map_render.rs | 16 ++++++++++++++++ docs/SKATE-MAPS.md | 2 +- docs/custom-map-lighting.md | 8 ++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/crates/skate-game/src/map_render.rs b/crates/skate-game/src/map_render.rs index 759ec7e8..7b0f8976 100644 --- a/crates/skate-game/src/map_render.rs +++ b/crates/skate-game/src/map_render.rs @@ -183,6 +183,22 @@ impl MapAssets { mod tests { use super::*; #[test] + #[ignore = "requires user-supplied custom map; CPU preparation only"] + fn supplied_custom_map_prepares_and_retires() { + let path = std::env::var("SKATE_TEST_CUSTOM_MAP").unwrap(); + let root = std::env::var("SKATE_TEST_CUSTOM_ASSETS").unwrap(); + let map = skate_data::skate_map::SkateMap::load(std::path::Path::new(&path)).unwrap(); + crate::skate_world::validate_runtime(&map).unwrap(); + assert!(!crate::retail_render::RetailScene::for_map(&map)); + let mut world = world(); + let mut scene = PreparedScene::new(&world); + scene.prepare(Some(&map), std::path::Path::new(&root)); + scene.publish(&mut world); + assert_eq!(world.query::<&DirectionalLight>().iter(&world).count(), 1); + MapAssets::retire(&mut world); + assert_eq!(world.query_filtered::>().iter(&world).count(), 0); + } + #[test] fn custom_lighting_switches_without_accumulation_and_keeps_pbr() { let mut world = world(); let mut map = skate_data::skate_map::SkateMap::parse(include_bytes!("../../../maps/format-demo.skate")).unwrap(); diff --git a/docs/SKATE-MAPS.md b/docs/SKATE-MAPS.md index 67d68614..560692be 100644 --- a/docs/SKATE-MAPS.md +++ b/docs/SKATE-MAPS.md @@ -15,7 +15,7 @@ error and do not silently load the default level instead. | Data | Current support | | --- | --- | -| SKATE01–14 records | Reader supports the documented layouts and raw, zlib and Zstandard blocks. | +| SKATE01–15 records | Reader supports raw, zlib and Zstandard blocks, plus v15 compressed materials, filtered RGBA, vertex streams, delta indices, indexed collision and backward texture references. | | SKATE15+ | Rejected with a version error. V15's additional storage transforms are not implemented. | | Visual geometry | Authored positions, triangle winding, normals, UV0/UV1 and material groups. Packed v12+ tangent frames are reconstructed. | | Embedded materials | Albedo, normal, ORM, emissive, alpha mask/blend and indirect lightmaps. Lightmap RGB is decoded as `encoded² * 4` into half-float textures. | diff --git a/docs/custom-map-lighting.md b/docs/custom-map-lighting.md index a97ae0b2..3b9789e9 100644 --- a/docs/custom-map-lighting.md +++ b/docs/custom-map-lighting.md @@ -73,3 +73,11 @@ directly into the worktree's ignored private output using the shared Cargo cache. All six focused CPU tests passed: `map_render::tests` (3), `retail_character::tests` (2), and `camera::environment_tests` (1). These checks do not validate GPU appearance; use the visual checklist above. + +SKATE15 loading is also covered by ten data-reader tests (including legacy +versions, both compression codecs, all storage transforms, texture references +and malformed input). A user-supplied v15 custom map passed the ignored CPU +`supplied_custom_map_prepares_and_retires` check: decoding, runtime validation, +material/mesh preparation, publication, custom-light classification and scene +retirement. Supply `SKATE_TEST_CUSTOM_MAP` and `SKATE_TEST_CUSTOM_ASSETS` to run +that check on another local custom map; no user map bytes are committed.