Game Development Community

Is the point light specular error?

by 3Dgame · in Torque Game Engine Advanced · 12/11/2007 (11:30 pm) · 0 replies

I add a object with a specular material to the scene.
It was rendered ok in the sun light.
But when I add a point light near it,I can't see a correct specular rendered.
I found the shader generated to see how it work.

OUT.outLightVec.xyz = -inLightVec;

It use the Vertex Const VC_LIGHT_DIR1 to define the light Direction,and use this to generate specular.
But this is a point light,not a direction light.
So I think this is a error.

And the direction is always (0 0 1).