We report for the first time the generation of optimized space-invariant fan-out elements, so-called Dammann gratings [H. Dammann and K. Görtler, Opt. Commun. 3, 312 (1971)] in plasma silicon nitride. Diffraction efficiencies as high as 65% have been achieved. Using simulated annealing and the greedy algorithm, grating structures with fan-out as large as 201×201 can readily be calculated. Low absorption and high optical quality together with its ease of structuring make silicon nitride an ideal medium for the construction of phase-only optical elements.