Microsoft DirectX 8.0 (C++) |
You can simulate a muscle moving under skin by an ellipsoid computed from a sphere with scaling along three axes. This can be evaluated and used to perturb the position of incoming mesh vertices. The muscle ellipsoid can be scaled and translated by updating the constant registers containing its relative position and scale factors.