diff --git a/src/coders/vcm.cpp b/src/coders/vcm.cpp index 260657338..bf9a152a6 100644 --- a/src/coders/vcm.cpp +++ b/src/coders/vcm.cpp @@ -192,7 +192,12 @@ static void perform_rect(const xmlelement& root, ModelBuilder& builder) { } std::string texture = root.attr("texture", "$0").getText(); - auto normal = glm::cross(glm::normalize(right), glm::normalize(up)); + glm::vec3 normal; + if (root.has("normal")) { + normal = root.attr("normal").asVec3(); + } else { + normal = glm::cross(glm::normalize(right), glm::normalize(up)); + } builder.addRect( texture, shading,