Updated passes function with a second parameter (objectShadow).