What are some factors that will affect a star's apparent magnitude?