A system for uniformly and controllably heating the active surface of a semiconductor wafer or substrate during processing. The pupil filter can be placed at the pupil plane of a projection optics system. A printing machine having a cleaning device is also provided. Preferably, the fluid can be heated or cooled prior to being introduced to the filter unit.