We have some GLSL code in a shared file included both in vertex and fragment shaders (quite many of them). I'd like to ifdef a certain function based on whether it's included in a vertex or a fragment shader.
Is there a reserved word or a define that we can use for that?
No, you'll have to inject a define yourself.