Conal Elliott (the guy who co-invented FRP) did a nice project on shading computational surfaces by extracting derivatives from code more than a decade ago: http://conal.net/Vertigo/
He is now very active in the differentiable programming community, but he got started on the problem in the graphics field.