diff options
| author | Jennifer Buehler <jennifer.buehler@tomtom.com> | 2019-09-23 11:22:20 +0200 |
|---|---|---|
| committer | Jennifer Buehler <jennifer.buehler@tomtom.com> | 2019-09-23 11:22:20 +0200 |
| commit | aa47a028c83c01b831e720163155109c11b279f5 (patch) | |
| tree | c56efcfc0f07e393f3261b6a2ce7e8de1f9c45c4 /code/PostProcessing/ComputeUVMappingProcess.cpp | |
| parent | 74ac8676e231c535ecaf527456054595f73f7b9c (diff) | |
Fix UV texture coords generation along Z Axis
Diffstat (limited to 'code/PostProcessing/ComputeUVMappingProcess.cpp')
| -rw-r--r-- | code/PostProcessing/ComputeUVMappingProcess.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/code/PostProcessing/ComputeUVMappingProcess.cpp b/code/PostProcessing/ComputeUVMappingProcess.cpp index bb571a551..df4d44337 100644 --- a/code/PostProcessing/ComputeUVMappingProcess.cpp +++ b/code/PostProcessing/ComputeUVMappingProcess.cpp @@ -354,12 +354,12 @@ void ComputeUVMappingProcess::ComputePlaneMapping(aiMesh* mesh,const aiVector3D& } else if (axis * base_axis_z >= angle_epsilon) { FindMeshCenter(mesh, center, min, max); - diffu = max.y - min.y; - diffv = max.z - min.z; + diffu = max.x - min.x; + diffv = max.y - min.y; for (unsigned int pnt = 0; pnt < mesh->mNumVertices;++pnt) { const aiVector3D& pos = mesh->mVertices[pnt]; - out[pnt].Set((pos.y - min.y) / diffu,(pos.x - min.x) / diffv,0.0); + out[pnt].Set((pos.x - min.x) / diffu,(pos.y - min.y) / diffv,0.0); } } // slower code path in case the mapping axis is not one of the coordinate system axes |
