In wide-field fluorescence microscopy, illuminating the specimen with evanescent standing waves increases lateral resolution more than twofold. We report a versatile setup for standing-wave illumination in total internal reflection fluorescence microscopy. An adjustable diffraction grating written on a phase-only spatial light modulator controls the illumination field. Selecting appropriate diffraction orders and displaying a sheared (tilted) diffraction grating allows one to tune the penetration depth in very fine steps. The setup achieves 91 nm lateral resolution for green emission.