Skip to content

Commit

Permalink
normalizing vec from normalmap
Browse files Browse the repository at this point in the history
  • Loading branch information
ssloy committed Jan 26, 2015
1 parent 1e33c57 commit ce49116
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Vec3f Model::normal(Vec2i uv) {
Vec3f res;
for (int i=0; i<3; i++)
res[2-i] = (float)c[i]/255.f*2.f - 1.f;
return res;
return res.normalize();
}

Vec2i Model::uv(int iface, int nthvert) {
Expand Down

0 comments on commit ce49116

Please sign in to comment.