Hidden culling in tile-based computer generated images
A method and system is provided for culling hidden objects in a tile-based graphics system before they are indicated in a display list for a tile. A rendering space is divided into a plurality of regions which may for example be a plurality of tiles or a plurality of areas into which one or more tiles are divided. Depth thresholds for the regions, which are used to identify hidden objects for culling, are updated when an object entirely covers a region and in dependence on a comparison between a depth value for the object and the depth for the region. For example, if the depth threshold is a maximum depth threshold, the depth threshold may be updated if an object entirely covers the tile and the maximum depth value of the object is less than the maximum depth threshold.
1 . A method of creating a display list for a tile in a graphics system, the method comprising:
determining whether to include an indication of an object in the display list in dependence on the result of at least one of one or more comparisons of depth values, the one or more comparisons of depth values each comprising comparing a depth value of the object with a depth threshold associated with a region of the tile comprising a plurality of image pixels;
updating the depth threshold associated with the region in dependence on a result of the one or more comparisons, the updating comprising updating a maximum depth threshold associated with the region if a maximum depth value for the object is less than the maximum depth threshold associated with the region and/or updating a minimum depth threshold associated with the region if the minimum depth value for the object is greater than the minimum depth threshold associated with the region; and
outputting the display list to a memory.
2 . The method as claimed in claim 1 , further comprising:
for each of one or more regions of a tile, determining, for each of a plurality of objects, one or more depth values located within the region.
3 . The method as claimed in claim 2 , further comprising:
performing a test comprising comparing at least one of one or more determined depth values for the object with a depth threshold associated with a region of the tile.
4 . The method as claimed in claim 3 , further comprising:
determining, for the object, whether the test is passed in dependence on the result of at least one of the one or more comparisons;
for an object that passes the test, including an indication of the object in the display list for the tile; and
for an object that does not pass the test, not including an indication of the object in the display list for the tile.
5 . The method as claimed in claim 1 , wherein the object comprises a single primitive, a plurality of primitives or a patch of surface data.
6 . The method as claimed in claim 1 , wherein comparisons between the depth values for the object and the depth threshold associated with the region comprise a comparison between a minimum depth value for the object and a maximum depth threshold associated with the region.
7 . The method as claimed in claim 1 , further comprising updating the depth threshold associated with the region in dependence on the result of at least one of the one or more comparisons if the object entirely covers the region.
8 . The method as claimed in claim 1 , wherein depth values for the object are derived by, for each region within which the object is located, deriving a depth value for the respective part of the object within that region.
9 . The method as claimed in claim 1 , wherein the tile comprises one or more regions, further comprising:
determining a depth value associated with the tile based on a depth threshold associated with each of the regions of the tile.
10 . The method as claimed in claim 9 , wherein determining the depth value associated with the tile based on the depth threshold associated with each of the regions of the tile comprises determining the greatest of the depth thresholds associated with the regions of the tile; and
setting the depth value associated with the tile to a value equal to or greater than the greatest of the depth thresholds associated with the regions of the tile.
11 . The method as claimed in claim 9 , wherein determining the depth value associated with the tile based on the depth threshold associated with each of the regions of the tile comprises determining the smallest of the depth values associated with the regions of the tile; and
setting the depth value associated with the tile to a value equal to or smaller than the smallest of the depth thresholds associated with the regions of the tile.
12 . The method as claimed in claim 9 , further comprising writing the depth thresholds associated with the one or more regions to a memory for temporarily storing data.
13 . A tile-based graphics system comprising:
a processor configured to create a display list for a tile in the graphics system by implementing a process of determining whether to include an indication of an object in the display list in dependence on the result of at least one of one or more comparisons of depth values, the one or more comparisons of depth values each comprising comparing a depth value of said object with a depth threshold associated with a region of the tile comprising a plurality of image pixels, and updating the depth threshold associated with the region in dependence on a result of the one or more comparisons, the updating comprising updating a maximum depth threshold associated with the region if a maximum depth value for the object is less than the maximum depth threshold associated with the region and/or updating a minimum depth threshold associated with the region if the minimum depth value for the object is greater than the minimum depth threshold associated with the region; and
a memory;
wherein the processor is further configured to output the display list to the memory.
14 . The tile-based graphics system as claimed in claim 13 , wherein the object comprises a single primitive, a plurality of primitives or a patch of surface data.
15 . The tile-based graphics system as claimed in claim 13 , wherein the one or more comparisons between the depth values for the object and the depth threshold associated with the region comprise a comparison between a minimum depth value for the object and a maximum depth threshold associated with the region.
16 . The tile-based graphics system as claimed in claim 13 , wherein the processor is further configured to update the depth threshold associated with the region in dependence on the result of at least one of the one or more comparisons if the object entirely covers the region.