mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:23:52 +00:00
Use Ogre's matrix ops to transform normals
This commit is contained in:
parent
bf26f029f9
commit
fefbf86531
1 changed files with 3 additions and 6 deletions
|
@ -557,12 +557,9 @@ class NIFMeshLoader : Ogre::ManualResourceLoader
|
|||
newVerts.at(index) += (mat*srcVerts[index]) * weight;
|
||||
if(newNorms.size() > index)
|
||||
{
|
||||
for(size_t j = 0;j < 3;j++)
|
||||
{
|
||||
newNorms[index][j] += mat[j][0]*srcNorms[index][0] * weight;
|
||||
newNorms[index][j] += mat[j][1]*srcNorms[index][1] * weight;
|
||||
newNorms[index][j] += mat[j][2]*srcNorms[index][2] * weight;
|
||||
}
|
||||
Ogre::Vector4 vec4(srcNorms[index][0], srcNorms[index][1], srcNorms[index][2], 0.0f);
|
||||
vec4 = mat*vec4 * weight;
|
||||
newNorms[index] += Ogre::Vector3(&vec4[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue