Hi!
fshader.glsl only does the rendering. The maps are calculated in the CPU using cimg image processing library. All the code is in image_procecssor.cpp. For the normals, is basically obtaining a heightmap from a distance transform, and the grayscale version of the image, and then using derivative opperators to get the normals.
Everything could be done in shaders (the most difficult part would be the distance transform, which i guess you could do with SDF?). I tried in the past to migrate everything to shaders, but the changes were too much and i didnt have the time. I also never sorted out how to do cli exports without a window if they depend on OpenGL, so CPU was better for that.