Skip to content

Commit

Permalink
Merge pull request assimp#1868 from EdwardAndrew/issue-1219
Browse files Browse the repository at this point in the history
Fixed issue#1219. CalcTangentsProcess::ProcessMesh.
  • Loading branch information
kimkulling authored Apr 6, 2018
2 parents 6403dc8 + 40f5f19 commit 5fbffd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/CalcTangentsProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ bool CalcTangentsProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex)
float tx = meshTex[p2].x - meshTex[p0].x, ty = meshTex[p2].y - meshTex[p0].y;
float dirCorrection = (tx * sy - ty * sx) < 0.0f ? -1.0f : 1.0f;
// when t1, t2, t3 in same position in UV space, just use default UV direction.
if ( 0 == sx && 0 ==sy && 0 == tx && 0 == ty ) {
if ( sx * ty == sy * tx ) {
sx = 0.0; sy = 1.0;
tx = 1.0; ty = 0.0;
}
Expand Down

0 comments on commit 5fbffd3

Please sign in to comment.