Attached shadow coding: Estimating surface normals from shadows under unknown reflectance and lighting conditions