diff options
Diffstat (limited to 'shared/src')
-rw-r--r-- | shared/src/helper.rs | 8 | ||||
-rw-r--r-- | shared/src/resources.rs | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/shared/src/helper.rs b/shared/src/helper.rs index d91313c..706e36b 100644 --- a/shared/src/helper.rs +++ b/shared/src/helper.rs @@ -126,3 +126,11 @@ impl<T: ReadWrite, const N: usize> ReadWrite for [T; N] { [(); N].try_map(|()| T::read(r)) } } +impl ReadWrite for () { + fn write(&self, _w: &mut dyn Write) -> Result<()> { + Ok(()) + } + fn read(_r: &mut dyn Read) -> Result<Self> { + Ok(()) + } +} diff --git a/shared/src/resources.rs b/shared/src/resources.rs index 25dd965..7a52e85 100644 --- a/shared/src/resources.rs +++ b/shared/src/resources.rs @@ -57,6 +57,7 @@ pub struct MeshPart { pub g_refractive_index: Option<f32>, pub g_attenuation: Option<Vec3A>, pub g_dispersion: Option<f32>, + pub g_unlit: Option<()>, pub va_position: Option<[Resource<AttributeArray>; 3]>, pub va_normal: Option<[Resource<AttributeArray>; 3]>, pub va_texcoord: Option<[Resource<AttributeArray>; 2]>, @@ -183,6 +184,7 @@ impl ReadWrite for MeshPart { write_kv_opt(w, b"g_transmission", &self.g_transmission)?; write_kv_opt(w, b"g_alpha", &self.g_alpha)?; write_kv_opt(w, b"g_emission", &self.g_emission)?; + write_kv_opt(w, b"g_unlit", &self.g_unlit)?; write_kv_opt(w, b"va_position", &self.va_position)?; write_kv_opt(w, b"va_normal", &self.va_normal)?; write_kv_opt(w, b"va_texcoord", &self.va_texcoord)?; |