Showing the changes to libraries/render-utils/src/Model.cpp (1 of 218 files). Show all
Unified · Split
| @@ -1110,7 +1110,9 @@ void Blender::run() { · 1109 unmodified lines | |||
| 1110 | int index = blendshape.indices.at(j); | 1110 | int index = blendshape.indices.at(j); |
| 1111 | meshVertices[index] += blendshape.vertices.at(j) * vertexCoefficient; | 1111 | meshVertices[index] += blendshape.vertices.at(j) * vertexCoefficient; |
| 1112 | meshNormals[index] += blendshape.normals.at(j) * normalCoefficient; | 1112 | meshNormals[index] += blendshape.normals.at(j) * normalCoefficient; |
| 1113 | meshTangents[index] += blendshape.tangents.at(j) * normalCoefficient; | 1113 | if (blendshape.tangents.size() > j) { |
| 1114 | meshTangents[index] += blendshape.tangents.at(j) * normalCoefficient; | ||
| 1115 | } | ||
| 1114 | } | 1116 | } |
| 1115 | } | 1117 | } |
| 1116 | } | 1118 | } |
| @@ -1312,7 +1314,7 @@ void Model::setBlendedVertices(int blendNumber, const Geometry::WeakPointer& geo · 195 unmodified lines | |||
| 1312 | 1314 | ||
| 1313 | normalsAndTangents.clear(); | 1315 | normalsAndTangents.clear(); |
| 1314 | normalsAndTangents.resize(normals.size()+tangents.size()); | 1316 | normalsAndTangents.resize(normals.size()+tangents.size()); |
| 1315 | assert(normalsAndTangents.size() == 2 * vertexCount); | 1317 | // assert(normalsAndTangents.size() == 2 * vertexCount); |
| 1316 | 1318 | ||
| 1317 | // Interleave normals and tangents | 1319 | // Interleave normals and tangents |
| 1318 | #if 0 | 1320 | #if 0 |