summaryrefslogtreecommitdiff
path: root/engine/src/file_format/wavefront
diff options
context:
space:
mode:
Diffstat (limited to 'engine/src/file_format/wavefront')
-rw-r--r--engine/src/file_format/wavefront/mtl.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/engine/src/file_format/wavefront/mtl.rs b/engine/src/file_format/wavefront/mtl.rs
index 7d1c570..f3c7a64 100644
--- a/engine/src/file_format/wavefront/mtl.rs
+++ b/engine/src/file_format/wavefront/mtl.rs
@@ -234,6 +234,24 @@ fn statements_to_materials(
path: Path::new(texture_file_path).to_path_buf(),
});
}
+ Keyword::Ns => {
+ if statement.arguments.len() != 1 {
+ return Err(Error::UnsupportedArgumentCount {
+ keyword: statement.keyword.to_string(),
+ arg_count: statement.arguments.len(),
+ line_no,
+ });
+ }
+
+ let shininess = statement.get_float_arg(0, line_no)?;
+
+ tracing::debug!(
+ "Adding shininess {shininess} to material {}",
+ curr_material.name
+ );
+
+ curr_material.shininess = shininess;
+ }
Keyword::Newmtl => {}
}
}
@@ -279,5 +297,7 @@ keyword! {
#[keyword(rename = "map_Ks")]
MapKs,
+
+ Ns,
}
}