I'm curious how GIS systems actually generate a hill-shade from input data like a raster DEM layer. I'd like to implement my own in software (mostly for fun/learning) but I want to start with a plausible algorithm so I don't waste an incredible amount of time.
Naively, I'd think you could scan the elevation data, calculate the slope from point to point in a given direction (say left to right), then color all of either the positive or negative slopes. If the min and max slopes in the elevation tile were known, it seems like it might also be nice to scale the color based on that.
Is that a plausible way to go about the problem?