I am using the shadow mapping example provided by Egon (Thanks again!) . I experimented a little
and then tried to update light position and direction in real time. But somehow I was not able to see any changes in the shadowmap blit and the scene too ,when I changed the position and direction of light(I am using directional light present in Thomas' sampls ) .
If you are using the code from the example, that's because i bound the calculation of the corresponding values to this statement in updateProjector():
if (light != null && projectionMatrix == null) {
...
}
If you comment this statement out, it should update correctly. However, it creates some garbage objects this way in each frame. So it's better to do it in case of a real change in position or direction only.