mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 23:33:48 +02:00
Fix for head cauterization.
When rendering rigidly bound mesh clusters were not properly using the cauterization matrix set.
This commit is contained in:
parent
7a10b31dd9
commit
e52bf2e12d
1 changed files with 8 additions and 2 deletions
|
@ -1625,15 +1625,21 @@ void Model::renderPart(RenderArgs* args, int meshIndex, int partIndex, bool tran
|
|||
}
|
||||
|
||||
if (isSkinned) {
|
||||
const float* bones = (const float*)state.clusterMatrices.constData();
|
||||
const float* bones;
|
||||
if (_cauterizeBones) {
|
||||
bones = (const float*)state.cauterizedClusterMatrices.constData();
|
||||
} else {
|
||||
bones = (const float*)state.clusterMatrices.constData();
|
||||
}
|
||||
batch._glUniformMatrix4fv(locations->clusterMatrices, state.clusterMatrices.size(), false, bones);
|
||||
_transforms[0] = Transform();
|
||||
_transforms[0].preTranslate(_translation);
|
||||
} else {
|
||||
_transforms[0] = Transform(state.clusterMatrices[0]);
|
||||
if (_cauterizeBones) {
|
||||
_transforms[0] = Transform(state.cauterizedClusterMatrices[0]);
|
||||
} else {
|
||||
_transforms[0] = Transform(state.clusterMatrices[0]);
|
||||
}
|
||||
_transforms[0].preTranslate(_translation);
|
||||
}
|
||||
batch.setModelTransform(_transforms[0]);
|
||||
|
|
Loading…
Reference in a new issue