Factors affecting the brightness of stars