If we talk about shader programs (doesn't matter if fragment or vertex ones), they're different animals. You've got some 3D APIs like Direct3D, OpenGL, J3D (which is kinda operating on top of previous two), and now you've got shading languages that require to have some binding to the 3D APIs.
Direct3D has binding for HLSL (and also Cg from nVidia since these two shading languages are distinguished only formally I think), OpenGL has binding for GLSL. I choosed to use J3D API and Cg shading laguage, since both allow you to target your program on D3D or OGL. So, shading languages are "platform" independent (but read something about device profiles), it doesn't matter which 3D API you use if it has a way how to load shader program written in certain shading laguage.