The invention relates to a device for processing material (M) by means of focused electromagnetic radiation comprising: a source (10), which emits electromagnetic radiation (12), means (14, 16, 18, 22, 26) for directing the radiation at the material (M), means (28) for focusing the radiation on or in the material (M), an apparatus (20) for producing a pattern (32) in the beam path of the electromagnetic radiation, an at least partially reflective surface (30) in the beam path in front of the focus (F) of the focused radiation, wherein said pattern (32) is imaged on said at least partially reflective surface (30) by means of at least some of said means for directing the radiation and said means for focusing the radiation, at least one detector (D1, D2), onto which an image of the pattern (32) of said surface (30) is reflected and which produces electrical signals corresponding to said image, wherein the image contains a piece of information about the position of the focal point (F), a computer (C), which receives said electrical signals and which is programmed to process said image in order to generate an electrical signal (34) that depends on the position of the focal point, and a divergence setting element (18), which is arranged in said beam path and designed to receive said electrical signal (34) of the computer (10) in order to change a divergence of the electromagnetic radiation according to the signal.収束電磁放射によって物質を処理する装置が、電磁放射を射出する放射源と、放射を物質上に導く手段と、放射を物質上またはその中に収束させる手段と、電磁放射の光路内にパターンを生成するユニットと、収束放射の焦点より前方の光路内の少なくとも部分反射性の面であって、前記パターンが、前記導く手段の少なくとも一部分および前記収束させる手段を通って、その上に結像される少なくとも部分反射性の面と、パターンの画像が、前記面によってその上に反射される少なくとも1つの検出器であって、前記画像に対応する電気信号を生成し、前記画像が焦点の位置の情報を含む、少なくとも1つの検出器と、前記電気信号を受け取り、前記画像を処理して焦点位置に応じる電気信号を生成するようにプログラムされたコンピュータと、コンピュータの前記電気信号を受け取るように構成され、前記信号に応じて電磁放射の発散を変化させる発散調節要素とを備える。