Skip to content

Commit 0e5430e

Browse files
author
Zhihao Ruan
committed
change get normal vector warning condition
1 parent ab0f369 commit 0e5430e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/obj_loader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ glm::vec3 ObjLoader::getNormalVec(const int shape_id,
7777

7878
glm::vec3 normal{0.0f, 0.0f, 0.0f};
7979

80-
if (idx.normal_index >= 0) {
80+
if (idx.normal_index > 0) {
8181
const auto& attrib = reader_.GetAttrib();
8282
normal.x = attrib.normals[idx.vertex_index * 3 + 0];
8383
normal.y = attrib.normals[idx.vertex_index * 3 + 1];

0 commit comments

Comments
 (0)