From c80016a9ef91da2362d6874c130941efcf36ac00 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Thu, 9 Jan 2025 03:01:52 +0100 Subject: add more gltf extensions --- world/Cargo.toml | 3 +++ world/src/mesh.rs | 13 ++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) (limited to 'world') diff --git a/world/Cargo.toml b/world/Cargo.toml index 11272ed..51437d5 100644 --- a/world/Cargo.toml +++ b/world/Cargo.toml @@ -12,6 +12,9 @@ gltf = { version = "1.4.1", features = [ "names", "KHR_lights_punctual", "KHR_materials_transmission", + "KHR_materials_ior", + "KHR_materials_volume", + "KHR_materials_emissive_strength", ] } log = "0.4.22" weareshared = { path = "../shared" } diff --git a/world/src/mesh.rs b/world/src/mesh.rs index 3190c28..216f8f3 100644 --- a/world/src/mesh.rs +++ b/world/src/mesh.rs @@ -283,10 +283,17 @@ pub fn import_mesh( tex_emission, tex_transmission, index, + // not yet implemented + g_attenuation: None, + g_dispersion: None, + g_refractive_index: None, + g_thickness: None, + tex_thickness: None, + // not supported by gltf va_transmission: None, - va_emission: None, // not supported by gltf - va_metallic: None, // not supported by gltf - va_roughness: None, // not supported by gltf + va_emission: None, + va_metallic: None, + va_roughness: None, })?; let mat = node.transform().matrix(); let aff = Affine3A::from_cols_array_2d(&[ -- cgit v1.2.3-70-g09d2