This disclosure provides a method for clustering
point light sources, a rendering method, and a
computer program product. The method includes: acquiring a
point light source dataset corresponding to a target geographic region, wherein the
point light source dataset includes the identifier, location, and
radius of each
point light source, and the number of point light sources is two or more; establishing an association between the identifier of each
point light source and the geographic grid obtained by pre-dividing the target geographic region based on the location range of each
point light source and the geographic grid obtained by pre-dividing the target geographic region; determining the target geographic grid related to the
visible range of the view
frustum based on the location range of the geographic grid, the view
frustum parameters, and the camera
pose; using the point light sources associated with the target geographic grid as point light sources to be processed, and clustering the point light sources to be processed based on the view
frustum parameters, the location and
radius of the point light sources to be processed, and the preset number of blocks of the view frustum clipping plane, wherein one cluster corresponds to one block of the clipping plane, and the number of point light sources in each cluster does not exceed a preset number threshold.