How to do relief shaded height map?

What about light settings in relief shading?
(For 2d terrain atlas maps)
What is the formula to calculate the relief factor for color,when all I have is x,y coordinate and height in this coordinate?