Corrected texture coordinates
This commit is contained in:
parent
f903ac5208
commit
ff46c54705
1 changed files with 2 additions and 2 deletions
|
@ -66,10 +66,10 @@ getIndex v = do
|
||||||
return i
|
return i
|
||||||
|
|
||||||
makeVertexData :: ObjModel -> FaceVertex -> Interleaved
|
makeVertexData :: ObjModel -> FaceVertex -> Interleaved
|
||||||
makeVertexData model (v, t, n) = Interleaved ts tt nx ny nz vx vy vz
|
makeVertexData model (v, t, n) = Interleaved tu (-tv) nx ny nz vx vy vz
|
||||||
where
|
where
|
||||||
(vx, vy, vz) = genericIndex (objVertices model) v
|
(vx, vy, vz) = genericIndex (objVertices model) v
|
||||||
(ts, tt) = if isJust t then genericIndex (objTexCoords model) $ fromJust t else (0, 0)
|
(tu, tv) = if isJust t then genericIndex (objTexCoords model) $ fromJust t else (0, 0)
|
||||||
(nx, ny, nz) = if isJust n then genericIndex (objNormals model) $ fromJust n else (0, 0, 0)
|
(nx, ny, nz) = if isJust n then genericIndex (objNormals model) $ fromJust n else (0, 0, 0)
|
||||||
|
|
||||||
|
|
||||||
|
|
Reference in a new issue