1,360
edits
Line 1,271: | Line 1,271: | ||
It would be customary to pass a normalized vector, but if you don't know how to do it, the shader will do it for you. By assigning properties to the pointing coordinates, the light direction can be changed runtime. | It would be customary to pass a normalized vector, but if you don't know how to do it, the shader will do it for you. By assigning properties to the pointing coordinates, the light direction can be changed runtime. | ||
<b>Do not use a rotation animation to change the light direction - it won't work.</b> Make the pointing vector properties and change them to your needs. | |||
* fading of a directional light away from the pointing axis is controlled by passing angles (or rather sines of angles). | * fading of a directional light away from the pointing axis is controlled by passing angles (or rather sines of angles). |
edits