A diffractive optical element for beam shaping of a laser beam having a first wavelength of at least 100 nm, the beam shaping of the laser beam having the first wavelength taking place by reflection of the laser beam on the diffractive optical element, the diffractive optical element having a layered structure made of a substrate and a dielectric layer, the dielectric layer adjoining the substrate, or the diffractive optical element having a layered structure made of a substrate, a dielectric layer and an absorption layer, the absorption layer being located between the substrate and the dielectric layer, wherein the dielectric layer comprises a layered structure with a plurality of layers of different refractive indices,
- in both variants, the dielectric layer having a plurality of bulges, the bulges having a height perpendicular to the dielectric layer, and at least one bulge having a height of at least half the first wavelength, wherein the plurality of bulges are formed directly by a heating laser beam in situ without adding any additional material or removing any material from a laser mirror, wherein the layered structure of the dielectric layer is maintained for the bulges, and wherein the generated bulges are permanent bulges that remain in the dielectric layer after the heating laser beams are no longer applied.