Please correct me if I'm wrong. When using vertex and pixel shaders, we usually provide the code to compute the output gl_position of the vertex shader. Then, we find ouselves with the input gl_FragCoord in the pixel shader. What are the name of the operations performed by OpenGL to compute gl_FragCoord from gl_position ? Is it correct that those are "projection" and "clip coordinates transform" ? Then, what exactly are the transformations performs during those operations ? In other terms, what is the mathematical relation between gl_FragCoord and gl_position, that I could use to replace the openGL function ?
Thank you very much for any contribution.