It is advantageous for some diffractive optical element (DOE) applications to produce different output patterns in different circumstances. There has been considerable work on the design of wavelength multiplexing DOEs and in devices where the polarization of the incident light determines the output. One parameter that has not, to our knowledge, been exploited for pattern formation DOEs is the mode of operation, i.e., whether the element works in reflection or transmission. We present an approach for designing such devices and design an element with modeled efficiency, mean square error (MSE), and cross-talk of 65.9, 2.52, and 4.2% in transmission and 66.6, 2.50, and 3.5% in reflection. The element has been successfully fabricated and has measured efficiencies of 58.3% ± 2 in reflection and 68.8% ± 5 in transmission are reported. © 2008 Optical Society of America.