Match the lighting/alpha logic in the sw transform.