File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -58,9 +58,9 @@ Material to_material(gltf::Material const& material) {
5858 ret->roughness = material.pbr .roughness_factor ;
5959 ret->alpha_mode = material.alpha_mode ;
6060 ret->alpha_cutoff = material.alpha_cutoff ;
61- ret->base_colour = material.pbr .base_colour_texture ->texture ;
62- ret->roughness_metallic = material.pbr .metallic_roughness_texture ->texture ;
63- ret->emissive = material.emissive_texture ->texture ;
61+ if (material. pbr . base_colour_texture ) { ret->base_colour = material.pbr .base_colour_texture ->texture ; }
62+ if (material. pbr . metallic_roughness_texture ) { ret->roughness_metallic = material.pbr .metallic_roughness_texture ->texture ; }
63+ if (material. emissive_texture ) { ret->emissive = material.emissive_texture ->texture ; }
6464 ret->emissive_factor = material.emissive_factor ;
6565 return {std::move (ret)};
6666}
You can’t perform that action at this time.
0 commit comments