For recent GLSL versions, if texture2D function call appears, the error message reports an unsupported type constructor. Change message to unsupported function. Likewise for other removed texture* function calls.