Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
bf5f215f
Commit
bf5f215f
authored
14 years ago
by
David Parks
Browse files
Options
Downloads
Patches
Plain Diff
Cleanup from review.
parent
fc92e097
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/newview/llviewerjointmesh.cpp
+26
-43
26 additions, 43 deletions
indra/newview/llviewerjointmesh.cpp
with
26 additions
and
43 deletions
indra/newview/llviewerjointmesh.cpp
+
26
−
43
View file @
bf5f215f
...
@@ -827,9 +827,9 @@ void LLViewerJointMesh::updateGeometryOriginal(LLFace *mFace, LLPolyMesh *mMesh)
...
@@ -827,9 +827,9 @@ void LLViewerJointMesh::updateGeometryOriginal(LLFace *mFace, LLPolyMesh *mMesh)
//F32 last_weight = F32_MAX;
//F32 last_weight = F32_MAX;
LLMatrix4a
gBlendMat
;
LLMatrix4a
gBlendMat
;
__restrict
const
F32
*
weights
=
mMesh
->
getWeights
();
const
F32
*
__restrict
weights
=
mMesh
->
getWeights
();
__restrict
co
nst
LLVector4
*
coords
=
mMesh
->
getCoords
();
const
LLVector4a
*
__restrict
co
ords
=
(
LLVector4
a
*
)
mMesh
->
getCoords
();
__restrict
const
LLVector4
*
normals
=
mMesh
->
getNormals
();
const
LLVector4
a
*
__restrict
normals
=
(
LLVector4a
*
)
mMesh
->
getNormals
();
for
(
U32
index
=
0
;
index
<
mMesh
->
getNumVertices
();
index
++
)
for
(
U32
index
=
0
;
index
<
mMesh
->
getNumVertices
();
index
++
)
{
{
...
@@ -838,54 +838,37 @@ void LLViewerJointMesh::updateGeometryOriginal(LLFace *mFace, LLPolyMesh *mMesh)
...
@@ -838,54 +838,37 @@ void LLViewerJointMesh::updateGeometryOriginal(LLFace *mFace, LLPolyMesh *mMesh)
// blend by first matrix
// blend by first matrix
F32
w
=
weights
[
index
];
F32
w
=
weights
[
index
];
LLVector4a
coord
;
//
LLVector4a coord;
coord
.
load4a
(
coords
[
index
].
mV
);
//
coord.load4a(coords[index].mV);
LLVector4a
norm
;
//
LLVector4a norm;
norm
.
load4a
(
normals
[
index
].
mV
);
//
norm.load4a(normals[index].mV);
// Maybe we don't have to change gBlendMat.
S32
joint
=
llfloor
(
w
);
// Profiles of a single-avatar scene on a Mac show this to be a very
w
-=
joint
;
// common case. JC
//
if (w
!= last_weight
)
if
(
w
>
0.
f
)
{
{
//last_weight = w;
// Try to keep all the accesses to the matrix data as close
// together as possible. This function is a hot spot on the
// Mac. JC
gBlendMat
.
setLerp
(
gJointMatAligned
[
joint
+
0
],
gJointMatAligned
[
joint
+
1
],
w
);
S32
joint
=
llfloor
(
w
);
LLVector4a
res
;
w
-=
joint
;
gBlendMat
.
affineTransform
(
coords
[
index
],
res
);
o_vertices
[
bidx
].
setVec
(
res
[
0
],
res
[
1
],
res
[
2
]);
gBlendMat
.
rotate
(
normals
[
index
],
res
);
if
(
w
>=
0.
f
)
o_normals
[
bidx
].
setVec
(
res
[
0
],
res
[
1
],
res
[
2
]);
{
// Try to keep all the accesses to the matrix data as close
// together as possible. This function is a hot spot on the
// Mac. JC
gBlendMat
.
setLerp
(
gJointMatAligned
[
joint
+
0
],
gJointMatAligned
[
joint
+
1
],
w
);
LLVector4a
res
;
gBlendMat
.
affineTransform
(
coord
,
res
);
o_vertices
[
bidx
].
setVec
(
res
[
0
],
res
[
1
],
res
[
2
]);
gBlendMat
.
rotate
(
norm
,
res
);
o_normals
[
bidx
].
setVec
(
res
[
0
],
res
[
1
],
res
[
2
]);
}
else
{
// No lerp required in this case.
LLVector4a
res
;
gJointMatAligned
[
joint
].
affineTransform
(
coord
,
res
);
o_vertices
[
bidx
].
setVec
(
res
[
0
],
res
[
1
],
res
[
2
]);
gJointMatAligned
[
joint
].
rotate
(
norm
,
res
);
o_normals
[
bidx
].
setVec
(
res
[
0
],
res
[
1
],
res
[
2
]);
}
}
}
/*
else
else
{ //
weight didn't change
{
//
No lerp required in this case.
LLVector4a
res
;
LLVector4a
res
;
g
BlendMat
.affineTransform(coord, res);
g
JointMatAligned
[
joint
]
.
affineTransform
(
coord
s
[
index
]
,
res
);
o_vertices
[
bidx
].
setVec
(
res
[
0
],
res
[
1
],
res
[
2
]);
o_vertices
[
bidx
].
setVec
(
res
[
0
],
res
[
1
],
res
[
2
]);
g
BlendMat
.rotate(norm, res);
g
JointMatAligned
[
joint
]
.
rotate
(
norm
als
[
index
]
,
res
);
o_normals
[
bidx
].
setVec
(
res
[
0
],
res
[
1
],
res
[
2
]);
o_normals
[
bidx
].
setVec
(
res
[
0
],
res
[
1
],
res
[
2
]);
}
*/
}
}
}
buffer
->
setBuffer
(
0
);
buffer
->
setBuffer
(
0
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment