Lateral etching into a substrate under a resist coating