I went digging. I put this thing together but it returns an error on startup. It says "ErrorX3004: Undeclared identifier in 'VS_Main'"

Code:

bmap tstonemap = <ts3tone.tga>;
material toon
{
skin1 = tstonemap;
effect
"
float4x4 matWorldViewProj;
float4x4 matWorld;
float4 vecSunDir;
Texture entSkin1;
Texture mtlSkin1;

struct VS_INPUT
{
float4 position : POSITION;
float2 TexCoords: TEXCOORD0;
float3 normal : NORMAL;
};

struct VS_OUTPUT
{
float4 position : POSITION;
float2 uvCoords: TEXCOORD0;
float2 TexCoords: TEXCOORD1;
float4 diffuse : COLOR;
};

VS_OUTPUT VS_Main(VS_INPUT input)
{
//zero out the struct members
VS_OUTPUT output = (VS_OUTPUT)0;

//transform vertex pos to clip space
output.position = mul(input.position, matWorldViewProj );
output.TexCoords= input.TexCoords;
float4 LightDir = mul(matWorld,-vecSunDir);
float diffuse = max(0,dot(LightDir,input.normal ));
output.uvCoords.x = diffuse;
output.uvCoords.y = 0.0f;
return output;
}

technique lightMapping
{
pass SingleLight
{
//globals
zwriteenable= true;
zenable = true;
//Stage variables
Texture[0]=<mtlSkin1>;
ColorOp[0]=Modulate;
ColorArg1[0]=Texture;
ColorArg2[0]=Texture;
AddressU[0]=Clamp;
AddressV[0]=Clamp;
AddressW[0]=Clamp;
Texture[1]=<entSkin1>;
ColorOp[1]=Modulate;
ColorArg1[1]=Texture;
ColorArg2[1]=Current;
//shaders
VertexShader = compile vs_1_0 VS_Main();
}
}

technique fallback // empty fallback causes normal rendering
{
pass p0 { }
}
"; // end of effect
}




My User Contributions master list - my initial post links are down but scroll down page to find list to active links