mirror of
https://github.com/SK8-ENGINE/skate-3-rust-engine.git
synced 2026-10-26 19:47:44 +00:00
Verify supplied v15 custom map scene preparation and document format support
This commit is contained in:
1 parent
a4666424cf
commit
284a5cad50
3 files changed
+25
-1
No files matched your search
@@ -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::<Entity, With<MapEntity>>().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();
|
||||
|
||||
+1
-1
@@ -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. |
|
||||
|
||||
@@ -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.
|
||||
Reference in new issue
Block a user