ShaderGen is an old tool from 3D labs, but its usefulness is not gone. The tool creates shaders that mimic the results of a set of fixed function state. There is a large set of options to define a state as available in OpenGL compatibility mode. Lighting, Fog, and all the other features that are gone in core profiles. Select the options you desire, check the result with fixed functionality, and then press “generate”. The tool creates the shaders that emulate those fixed function features. It only produces GLSL 1.2 code, but conversion shouldn’t be an issue.