summaryrefslogtreecommitdiff
path: root/world/src
diff options
context:
space:
mode:
Diffstat (limited to 'world/src')
-rw-r--r--world/src/mesh.rs17
1 files changed, 10 insertions, 7 deletions
diff --git a/world/src/mesh.rs b/world/src/mesh.rs
index 8742fb7..6a295c7 100644
--- a/world/src/mesh.rs
+++ b/world/src/mesh.rs
@@ -114,7 +114,7 @@ pub fn import_mesh(
})
.transpose()?;
- let va_transmission = reader
+ let va_alpha = reader
.read_colors(0)
.map(|iter| {
let mut color_a = vec![];
@@ -144,7 +144,7 @@ pub fn import_mesh(
let index = Some(store.set(&IndexArray(index))?);
let mut tex_albedo = None;
- let mut tex_transmission = None;
+ let mut tex_alpha = None;
if let Some(tex) = p.material().pbr_metallic_roughness().base_color_texture() {
let r = load_texture(
"albedo",
@@ -155,7 +155,7 @@ pub fn import_mesh(
webp,
)?;
tex_albedo = Some(r.clone());
- tex_transmission = Some(r.clone());
+ tex_alpha = Some(r.clone());
}
let mut tex_normal = None;
if let Some(tex) = p.material().normal_texture() {
@@ -213,7 +213,7 @@ pub fn import_mesh(
debug!("global albedo pruned");
None
};
- let g_transmission = if base_color[3] != 1. {
+ let g_alpha = if base_color[3] != 1. {
info!("global transmission is {}", base_color[3]);
Some(base_color[3])
} else {
@@ -235,7 +235,7 @@ pub fn import_mesh(
let mesh = store.set(&MeshPart {
g_albedo,
- g_transmission,
+ g_alpha,
g_metallic,
g_roughness,
g_emission,
@@ -243,14 +243,17 @@ pub fn import_mesh(
va_normal,
va_texcoord,
va_albedo,
- va_transmission,
+ va_alpha,
tex_albedo,
tex_normal,
tex_roughness,
tex_metallic,
- tex_transmission,
+ tex_alpha,
tex_emission,
index,
+ g_transmission: None,
+ tex_transmission: None,
+ va_transmission: None,
va_emission: None, // not supported by gltf
va_metallic: None, // not supported by gltf
va_roughness: None, // not supported by gltf