Looks like you did it almost the same way I did - the difference is I didn't use the LightVector and passed in the light position, colour, radius and attenuation from code instead; then handled the lighting model from there.
ambershee: What did you use instead of a light vector ? When you said code you hlsl code ?
Ace-Angel: Because it's based on the view angle of the viewer.
There's two component in the shader : An ambient scattering light wich is always visible at all angle and an other based on the Light Vector and Camera Vector wich is visible only when you're in the same angle between light and model.
Btw don't hesitate to post some screen in the thread. I will love to see some work using my shader !
I passed in light values from UnrealScript, as light vector wasn't giving me the results I wanted - this version actually looks pretty similar, but doesn't have the same hinderance my implementation did.
Replies
ambershee: What did you use instead of a light vector ? When you said code you hlsl code ?
Ace-Angel: Because it's based on the view angle of the viewer.
There's two component in the shader : An ambient scattering light wich is always visible at all angle and an other based on the Light Vector and Camera Vector wich is visible only when you're in the same angle between light and model.
Btw don't hesitate to post some screen in the thread. I will love to see some work using my shader !
Use the May version. That is the version I got it working with.