def update(self, task):
        """
        Engine task for updating shadow caster
        Args:
            task: Panda task, will be filled automatically

        Returns: task.con (task.continue)

        """
        light_dir = self.directional_light.get_mat().xform(-self.directional_light.node().get_direction()).xyz
        self.camera_rig.update(self.engine.camera, light_dir)

        src_mvp_array = self.camera_rig.get_mvp_array()
        mvp_array = PTA_LMatrix4()
        for array in src_mvp_array:
            mvp_array.push_back(array)
        self.engine.render.set_shader_inputs(pssm_mvps=mvp_array)

        # cache_diff = self.engine.clock.get_frame_time() - self.last_cache_reset
        # if cache_diff > 5.0:
        # self.last_cache_reset = self.engine.clock.get_frame_time()
        self.camera_rig.reset_film_size_cache()
        return task.cont

        Engine task for updating shadow caster
        Args:
            task: Panda task, will be filled automatically

        Returns: task.con (task.continue)

        
metadrive/engine/core/pssm.py