My vertex shader code for simple diffuse light is the following:
vfconn OUT;
OUT.HPos = mul(ModelViewProj, IN.position);
OUT.Col0=IN.position*saturate( dot(IN.norm, normalize(litepos-IN.position)) );
OUT.texcoord=IN.texcoord;
return OUT;
And the results:
pic
The radius of the lit area both increases with increasing x,y or z (a plane object on the x/y plane is lit)
I checked my vertices, normals and light position to be correct. Any idea whats wrong?
thank you in advance!
[This message has been edited by orbano (edited 01-11-2004).]