An illumination device for providing a controllable illumination configuration for an automotive headlamp, said illumination device comprising: a light-source unit (2; 20) comprising a plurality of individually controllable solid state light-sources; an optical element arranged to modulate light from said solid state light-sources through a modulation area of said optical element; an actuator connected to the light-source unit and controllable to move said light-source unit relative to said optical element in such a way that said solid state light-sources pass said modulation area of the optical element in succession; characterized by a control unit configured to control each of said solid state light-sources to emit light with a time-varying intensity corresponding to said illumination configuration while said solid state light-source moves past said modulation area of the optical element, wherein said control unit comprises: an input for receiving a control signal indicative of a desired illumination configuration; processing circuitry configured to determine a sequence of drive parameter values corresponding to said desired illumination configuration; and an output for providing said sequence of drive parameter values to each of said solid state light-sources depending on a position of said solid state light-source in relation to said modulation area of the optical element, wherein the intensity during the time when each light-source passes the modulation area of the optical element is varied by providing a time-varying current to each light-source as it passes the modulation area of the optical element. a light-source unit (2; 20) comprising a plurality of individually controllable solid state light-sources; an optical element arranged to modulate light from said solid state light-sources through a modulation area of said optical element; an actuator connected to the light-source unit and controllable to move said light-source unit relative to said optical element in such a way that said solid state light-sources pass said modulation area of the optical element in succession; characterized by a control unit configured to control each of said solid state light-sources to emit light with a time-varying intensity corresponding to said illumination configuration while said solid state light-source moves past said modulation area of the optical element, wherein said control unit comprises: an input for receiving a control signal indicative of a desired illumination configuration; processing circuitry configured to determine a sequence of drive parameter values corresponding to said desired illumination configuration; and an output for providing said sequence of drive parameter values to each of said solid state light-sources depending on a position of said solid state light-source in relation to said modulation area of the optical element, an input for receiving a control signal indicative of a desired illumination configuration; processing circuitry configured to determine a sequence of drive parameter values corresponding to said desired illumination configuration; and an output for providing said sequence of drive parameter values to each of said solid state light-sources depending on a position of said solid state light-source in relation to said modulation area of the optical element, wherein the intensity during the time when each light-source passes the modulation area of the optical element is varied by providing a time-varying current to each light-source as it passes the modulation area of the optical element.