fix shadow performance