diff options
Diffstat (limited to 'world/src/mesh.rs')
-rw-r--r-- | world/src/mesh.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/world/src/mesh.rs b/world/src/mesh.rs index de4617f..2bcf4c0 100644 --- a/world/src/mesh.rs +++ b/world/src/mesh.rs @@ -14,7 +14,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. */ -use crate::{Args, load_texture}; +use crate::{Args, TextureCache, load_texture}; use anyhow::Result; use gltf::{Mesh, Node, buffer::Data}; use log::{debug, info}; @@ -34,6 +34,7 @@ pub fn import_mesh( node: &Node, prefab: &mut Prefab, args: &Args, + texture_cache: &TextureCache, ) -> Result<()> { Ok(for p in mesh.primitives() { let name = mesh.name().or(node.name()).map(|e| e.to_owned()); @@ -121,6 +122,7 @@ pub fn import_mesh( &buffers, &tex.texture().source().source(), args.webp, + texture_cache, )?; tex_albedo = Some(r.clone()); tex_alpha = Some(r.clone()); @@ -134,6 +136,7 @@ pub fn import_mesh( &buffers, &tex.texture().source().source(), args.webp, + texture_cache, )?); } let mut tex_emission = None; @@ -145,6 +148,7 @@ pub fn import_mesh( &buffers, &tex.texture().source().source(), args.webp, + texture_cache, )?); } let mut tex_transmission = None; @@ -161,6 +165,7 @@ pub fn import_mesh( &buffers, &tex.texture().source().source(), args.webp, + texture_cache, )?); } let mut tex_thickness = None; @@ -177,6 +182,7 @@ pub fn import_mesh( &buffers, &tex.texture().source().source(), args.webp, + texture_cache, )?); } let mut tex_occlusion = None; @@ -188,6 +194,7 @@ pub fn import_mesh( &buffers, &tex.texture().source().source(), args.webp, + texture_cache, )?); } let mut tex_roughness = None; @@ -204,6 +211,7 @@ pub fn import_mesh( &buffers, &tex.texture().source().source(), args.webp, + texture_cache, )?; tex_roughness = Some(r.clone()); tex_metallic = Some(r.clone()); |