Microsoft DirectX 8.0 (C++)

Vertex Shader Tweening

The code for using vertex shader tweening is similar to the code for Fixed-Function Tweening. The only difference is the call to IDirect3DDevice8::CreateVertexShader as shown below.

m_d3dDevice->CreateVertexShader( decl, &vsFunction, &handle, 0 );

The second parameter for CreateVertexShader takes a pointer to a vertex shader function token array. This function can be created by calling any of the following functions.

The code example below assembles a vertex shader from the file AppTween.vsh.

D3DXAssembleShaderFromFile( "AppTween.vsh", 0, NULL, &vsFunction, NULL );

For more information on creating a vertex shader function, see Vertex Shader Function.