diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/model/asefile.cc | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/model/asefile.cc b/src/model/asefile.cc index 182c58c..a267d9b 100644 --- a/src/model/asefile.cc +++ b/src/model/asefile.cc @@ -103,10 +103,18 @@ bool ASEFile::read_mesh_face_list(std::istream &is) (line >> word) && (line >> a) && (line >> word) && (line >> b) && (line >> word) && (line >> c)) { - - fragment->add_vertex(ase_vertexlist[a], ase_vertexlist[a], false); - fragment->add_vertex(ase_vertexlist[b], ase_vertexlist[b], false); - fragment->add_vertex(ase_vertexlist[c], ase_vertexlist[c], false); + + math::Vector3f n(ase_vertexlist[a]); + n.normalize(); + fragment->add_vertex(ase_vertexlist[a], n, false); + + n.assign(ase_vertexlist[b]); + n.normalize(); + fragment->add_vertex(ase_vertexlist[b], n, false); + + n.assign(ase_vertexlist[c]); + n.normalize(); + fragment->add_vertex(ase_vertexlist[c], n, false); model->model_tris_count++; model->model_tris_detail_count++; |