Syntax

VertexShaderID = dbLoadVertexShader(Filename.s, VertexShaderID)

Description

If #PB_Any is used as the VertexShaderID parameter, the new ID will be returned as 'Result'. Otherwise the value of 'Result' is the same value passed as the VertexShaderID parameter.

This command will create a vertex shader from a specified text file. Use this command in concert with other vertex shader commands to create a special effect on a 3D object. Vertex shaders are powerful programmable effects, and not all 3D devices support them. Make sure that your shader text file includes the minimum amount of information with your code in order that assembly can take place. Ensure you are using the correct versioning label and that the input vertex data format is specified. An example of this syntax might be:

vs.1.0 dcl_position v0 dcl_normal v3 dcl_color v6 dcl_texcoord0 v7

See Also

dbDeletePixelShader, dbDeleteVertexShader, dbLoadEffect, dbLoadPixelShader, dbSetVertexShaderOff, dbSetVertexShaderOn, dbPixelShaderExist, dbVertexShaderExist