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:
Alessio Quaglino
2023-05-16 10:24:15 -07:00
committed by Copybara-Service
parent 9d1a21f99d
commit 9db444cd46
+1 -1
View File
@@ -711,7 +711,7 @@ void mjCMesh::LoadOBJ(mjResource* resource) {
}
// 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];
}
}