This leaves out the case where shadows are disabled, i.e. where `shadowsEnabled` is NO.