the deformation is really quick on hw, there is also a SSE paper about it from Intel, if you need a software solution, too.

but as T101 said, there normally arent that many objects with deformable surface, mostly only characters. however characters (unless you do some fancy hit detection on them) are normally represented by some primitives in collision, so I would favor hw skinning for them, although you wont have their transformed mesh in the app

I use following vertex program, of course depending on lighting you would add normal transformation and lighting computation too.

```
!!ARBvp1.0
# SKIN Shader
# 2 weight skinning, unlit, fog, 2 textures
#
# skinning: two weights and matrices per vertex
# fogcoord: distance to eyeplane
# textures: no texgen, no texmatrix
#
# by Christoph Kubisch
# Incoming vertex attributes:
ATTRIB inPos = vertex.position;
ATTRIB inTex0 = vertex.texcoord[0];
ATTRIB inTex1 = vertex.texcoord[1];
ATTRIB inColor = vertex.color;
ATTRIB inWeights = vertex.attrib[6]; # = { index0, weight0, index1, weight1 }
# Outgoing vertex attributes:
OUTPUT outPos = result.position;
OUTPUT outColor = result.color;
OUTPUT outTex0 = result.texcoord[0];
OUTPUT outTex1 = result.texcoord[1];
OUTPUT outFog = result.fogcoord;
PARAM mvp[4] = { state.matrix.mvp };
PARAM matrices[60] = { program.env[0..59] };
TEMP xfPos, temp;
ADDRESS arOffset; # Address register used to read offsets.
# WEIGHT TRANSFORMS
# Compute First Weight
# get matrix index
ARL arOffset.x, inWeights.x;
# POSITION
DP4 temp.x, matrices[arOffset.x], inPos;
DP4 temp.y, matrices[arOffset.x+1], inPos;
DP4 temp.z, matrices[arOffset.x+2], inPos;
MUL xfPos, temp, inWeights.y;
# Compute Second Weight
# get matrix index
ARL arOffset.x, inWeights.z;
# POSITION
DP4 temp.x, matrices[arOffset.x], inPos;
DP4 temp.y, matrices[arOffset.x+1], inPos;
DP4 temp.z, matrices[arOffset.x+2], inPos;
MAD xfPos, temp, inWeights.w, xfPos;
# VIEW TRANSFORMS
# Transform the vertex to clip coordinates.
MOV xfPos.w, inPos.w;
DP4 temp.x, mvp[0], xfPos;
DP4 temp.y, mvp[1], xfPos;
DP4 temp.z, mvp[2], xfPos;
DP4 temp.w, mvp[3], xfPos;
MOV outPos, temp;
# Output Fog
ABS outFog.x, temp.z;
# Output Color
MOV outColor, inColor;
# Output Tex
MOV outTex1, inTex1;
MOV outTex0, inTex0;
END
```