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:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user