The .hlsl file(s) here contain the rendering code, but they are not standard effect files. The techniques, semantics and textures listed in these files are ignored by the game and are only useful in an art package (3ds max, fx composer,etc). The only code in these effect files that is used by the game is the functions and function input/outputs (vertex structure, colors, samplers, etc).

The following data is constant and managed by the game, and should not be changed!
Material info, order
Light info, order
Sampler order
Vertex structure/inputs

Data cannot be re-ordered, or deleted.

If you wish to edit the shader code, it is **strongly** recommended that you copy this file, and get your code compiling and working in an external shader editor such as Nvidia's fx composer first, as there is NO error checking when the shader is compiled by the game! Also, the shaders are forced into compiling to the following shader models:
vertex shader: vs_2_0
pixel shader: ps_2_0

File explanations:

vehmainmat_bumpref.hlsl - Main vertex and pixel shaders for vehicles. The Vertex shader compiled here, is the only vertex shader used. Vertex shaders in other .hlsl files are ignored. The pixel shader calculates diffuse/ambient/specular lighting with normal and reflection maps.

vehmainmat_bump.hlsl - Same pixel shader as vehmainmat_bumpref, but without the reflection map. Vertex shader in this file is not compiled.

vehmainmat_lights.hlsl - Pixel shader for vehicle lights. Vertex shader in this file is not compiled.

shader results.txt - Output file with shader compilation results (errors, warnings, etc (if you have fucked code, it will probably crash the game rather than just display the error - i'm telling you, develop it offline!)).

There is one "warning" that will be output by default, about truncating a 4-vector. This is normal. I desaturate the input diffuse map, and use the saturated version as a specular map as well.

The "Artist" folder is not in this version. Simply copy and rename the .hlsl file to <whatever>,fx, to use it as an effect file.

12:48 PM 12/20/2007