Three-dimensional optical topometry of technical surfaces becomes increasingly important for the control of industrial processes. However, the local reflectance of the surface of the investigated sample often varies within a wide range, making accurate measurements by fringe projection difficult. We demonstrate the use of a liquid-crystal spatial light modulator as the fringe-generating element in a standard stereo microscope. With this device the brightness of the projected patterns can be adapted pixelwise. This technique leads to a significant improvement of the results of our measurements with a phase-shifting algorithm.