Shader replacement for OpenGL 2.1 only code

I’ve been using OpenGL 2.1 for about 10 years to generate 3-D images for publications. As a hobby during Covid, I started converting an open source windows game (C##) to GNU/linux/OpenGL and used what I know of OpenGL for the graphics.

I’ve now reached the stage where it seems sensible to update the graphics, to add shaders, but there seems to be a huge amount of work needed to code up all the standard OpenGL 2.1 options such as Multisampling, Fog, polygon offsets, etc., that the code uses (and needs).

I know enough about shader code to know that I could spend a couple of years, working an evening each week on shaders, but I suspect this is really like inventing the wheel again - somebody must have done something similar in the past. So why do it again?

Anyway, I’ve tried searching Google, Github, stackoverflow, OpenGL forums, etc., without any success. Lots of simple examples of shaders, many faulty, but nothing like a useful basis for a shader, or a set of shaders, with the options the program needs.

So the question is - actually three questions:

  1. Have I been looking in the wrong place?
  2. Does anyone know a good source of shaders that would help?
  3. Does anyone know of a good document (pdf etc) that discusses the conversion issues at depth and in a sensible (i.e. not trivial) way?

Many thanks for any help. D.