Use VBOs for vertices, indices when using shaders; multiply vertices by

weights even if we only have one weight per vertex.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@232 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Andrzej Kapolka
2007-05-09 19:51:32 +00:00
parent 0024a02067
commit 45df6d814b
3 changed files with 12 additions and 10 deletions
+2 -2
View File
@@ -49,8 +49,8 @@ void main ()
// add up the vertex as transformed by each bone and scaled by each weight
#if BONES_PER_VERTEX == 1
vec4 skinVertex = boneTransforms[int(boneIndices)] * gl_Vertex;
vec4 skinNormal = boneTransforms[int(boneIndices)] * normal4;
vec4 skinVertex = boneTransforms[int(boneIndices)] * gl_Vertex * boneWeights;
vec4 skinNormal = boneTransforms[int(boneIndices)] * normal4 * boneWeights;
#else
vec4 skinVertex = boneTransforms[int(boneIndices[0])] * gl_Vertex * boneWeights[0];
vec4 skinNormal = boneTransforms[int(boneIndices[0])] * normal4 * boneWeights[0];