It was the texture's internal format. I had to change it to GL_RGBA instead of 4.