Photolithography on bulk micromachined substrates