Everytime you call loadFromFile you reinitialize the sf::Shader instance. Calling it multiple times won't add the shaders to the same program. To load a vertex and fragment shaders in the same sf::Shader, use the other overload of loadFromFile. Well, in fact just read the dedicated doc and tutorials...