def compute_tile_size(self):
        """ Computes how many tiles there are on screen """
        self.tile_size = LVecBase2i(
            self.pipeline.settings["lighting.culling_grid_size_x"],
            self.pipeline.settings["lighting.culling_grid_size_y"]
        )
        num_tiles_x = int(math.ceil(Globals.resolution.x / float(self.tile_size.x)))
        num_tiles_y = int(math.ceil(Globals.resolution.y / float(self.tile_size.y)))
        self.debug(
            "Tile size =", self.tile_size.x, "x", self.tile_size.y, ", Num tiles =", num_tiles_x, "x", num_tiles_y
        )
        self.num_tiles = LVecBase2i(num_tiles_x, num_tiles_y)
 Computes how many tiles there are on screen 
metadrive/render_pipeline/rpcore/light_manager.py