Fixed texture mapping bug. Before this fix, the first texture coordinate was not correctly processed.
Fixes #859. PiperOrigin-RevId: 532501028 Change-Id: I1fe9ca470f4d64af606479b91387e43bc56c23dc
This commit is contained in:
committed by
Copybara-Service
parent
9d1a21f99d
commit
9db444cd46
@@ -711,7 +711,7 @@ void mjCMesh::LoadOBJ(mjResource* resource) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// flip the second texcoord
|
// flip the second texcoord
|
||||||
for (int i=1; i<usertexcoord.size()/2; i++) {
|
for (int i=0; i<usertexcoord.size()/2; i++) {
|
||||||
usertexcoord[2*i+1] = 1-usertexcoord[2*i+1];
|
usertexcoord[2*i+1] = 1-usertexcoord[2*i+1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user