I am trying to make a lens effect in Blender. I created the material for the lens with the Glass BSDF shader and connected it directly to the material output, and changed my render engine to Cycles. In the viewport everything looks fine:
But when I try to render the final image, the glass material becomes opaque. Is there any settings or something I could accidently have messed up? The final render looks like this:

