Microsoft DirectX 8.0 (Visual Basic) |
The code for using vertex shader tweening is similar to the code for Fixed-Function Tweening. The only difference is the call to Direct3DDevice8.CreateVertexShader as shown below.
Call 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.
Set vsFunction = d3dx.AssembleShaderFromFile( "AppTween.vsh", 0, ErrorLog, vsFunction)
For more information on creating a vertex shader function, see Vertex Shader Function.