Tessellation of surface data segments in tile-based rendering of computer graphics
By determining bounding depth values for tessellated segments in tile-based rendering, the method reduces computational effort and memory usage by excluding hidden primitives, enhancing rendering efficiency.
Patent Information
- Application Number
- DE102013114176
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2012-12-20
- Filing Date
- 2013-12-17
- Publication Date
- 2026-01-08
- Estimated Expiration
- 2033-12-17
AI Technical Summary
Tessellation in tile-based computer graphics rendering increases computational effort and memory requirements due to the large number of tessellated primitives that need to be processed and stored.
A method that subdivides the rendering space into tiles, tessellates surface data segments, determines bounding depth values for each tile, and renders only non-hidden segments by analyzing these values, reducing the need to process each individual tessellated primitive.
Reduces processing power, memory bandwidth, and storage requirements by eliminating the need to process and store hidden tessellated primitives, thereby optimizing tile-based rendering efficiency.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
AREA OF INVENTION
[0001] The present invention relates to a method and a system for removing hidden tessellated primitives in a tile-based computer graphics rendering system. BACKGROUND OF THE INVENTION
[0002] Tile-based rendering is a well-known technique for rendering 2D or 3D computer graphics. A render space is divided into multiple regions called tiles or blocks, which are typically rectangular and each contain several pixels. The render space can correspond to an image for display on a screen, but other render targets, such as texture data in memory, are also possible. Tiles can be of various sizes, but a typical size is, for example, 16 × 16 pixels. A high-resolution screen image typically has 1280 × 1024 pixels. Therefore, a high-resolution screen image can be divided into 5120 tiles (each with 16 × 16 pixels).
[0003] In a tile-based computer graphics system, primitive data is typically read from memory and converted into screen space. Primitives are often polygons, such as triangles, but they can also be lines or points. A display list is then generated for each tile, showing any primitives that are either wholly or partially contained within the tile. The display often includes an identifier or index for each primitive that references geometric data or creates a pointer to it, associated with the primitive stored in a parameter memory. The display lists are stored in memory.
[0004] Each tile is then rendered independently based on its display list.
[0005] For each tile, the primitives identified in the respective display list are processed, and hidden surfaces can be removed. The resulting pixel data for visible fragments is then passed to a shading unit, which applies textures and shading to each visible pixel within an object. After determining final pixel values for each pixel in the tile, the pixel data for the tile is written to memory for display on an output device.
[0006] Hidden areas are removed using a technique known as "z-buffering." In this technique, depth values for each primitive are calculated for each pixel in the tile obscured by that primitive. Then, processing each primitive sequentially, the depth values of each primitive are compared to the depth values for the respective pixels stored in a "z-buffer." If the depth value of a new primitive is closer to the eye or viewpoint than the currently stored depth value (for the surface of the previously processed primitives currently visible at that pixel), then the depth value for that pixel, along with all other values for that pixel, is replaced by the values of the new primitive at that pixel. If the depth value of a new primitive is farther from the eye or viewpoint than the currently stored depth value, then the values, including the depth value, of that pixel remain unchanged.
[0007] Tessellation is a well-known technique for adding texture to a low-detail model, generally referred to as a surface data segment in the computer graphics industry. A surface data segment is divided into a plurality of primitives, which are then moved from the surface of the segment as needed to derive a plurality of tessellated primitives. The primitives can be moved by applying a user-programmable function and / or based on a displacement height map. The tessellated primitives can then be tiled and rendered as described above. Tessellation is a useful tool that is becoming increasingly widespread in the computer graphics industry. However, it is understood that tessellating a surface data segment can significantly increase the computational effort required to render an image.Each tessellated surface data segment can contain thousands of tessellated primitives that need to be processed and possibly stored in memory.
[0008] The applicant has recognized that it would be desirable to reduce the amount of data transfer, data storage and processing required to render a tile, in particular a tile comprising tessellated primitives.
[0009] US patent US8089486 B2 describes a 3D graphics pipeline that includes a prefetch mechanism for feeding a cache of depth tiles. The prefetch mechanism can be predictive and use triangle geometry information from earlier pipeline stages to preload the cache, thereby increasing memory bandwidth efficiency. Optionally, a Z-value compression technique can be used to further reduce power consumption and memory bandwidth requirements.
[0010] British patent application GB2378108 A describes how three-dimensional computer graphics are generated by first dividing the image into a multitude of rectangular areas. A display list memory is loaded with object data for each rectangular area. The image and shading data for each image element of each area are derived from the object data in the image synthesis processor and a texturing and shading processor. A depth range generator derives a depth range for each area from the object data, while the imaging and shading data are derived. This is compared with the depth of each new object to be provided to the image synthesis processor, and the new object is provided or not depending on the result of the comparison.
[0011] Aila, T., et al. (2003), Delay streams for graphics hardware, ACM Transactions on Graphics, 22(3), pp. 792-800, describe how decisions in causal processes should not depend on future data. Many well-known problems, such as occlusion culling, order-independent transparency, and edge anti-aliasing, cannot be properly solved with traditional causal rendering architectures because future data can alter the interpretation of current events. Aila et al. propose adding a delay stream between the vertex and pixel processing units. While a triangle is in the delay stream, subsequent triangles generate occlusion information. As a result, the triangle can be removed by primitives transmitted after it. Aila et al. demonstrate how the memory requirements for order-independent transparency can be significantly reduced by using delay streams.
[0012] US patent application US2012 / 0299910 A1 describes a Z-culling method, a three-dimensional graphics processing method using Z-culling, and a corresponding apparatus. The Z-culling method comprises the following steps: A Z-cache memory is provided to cache a cover mask and a dynamic maximum depth value corresponding to each tile. A drawing mask, a maximum drawing depth value, and a minimum drawing depth value, calculated according to the tile and a drawn part, are determined. It is assessed whether the drawn part is completely contained within a known portion of the cover mask and coordinated with a comparison of the minimum drawing depth value and the dynamic maximum depth value to determine whether the drawn part should be discarded and the cover mask and the dynamic maximum depth value updated in the Z-cache memory.This efficiently reduces the bandwidth occupied in system memory.
[0013] US patent US7450120 B1 describes a processor that generates Z-culling information for tiles and groups of tiles. In one embodiment, the processor includes an on-chip cache to aggregate Z-information for tiles in order to identify hidden tiles. In a coprocessor embodiment, the processor provides Z-culling information to a graphics processing unit (GPU).
[0014] US Patent US6246415 B1 describes a method and device for conserving hardware resources in connection with the display of complex scenes. Polygons that comprise parts of the display can be filtered out before the hardware resources are used. An obfuscation parameter for this filtering can be determined by monitoring a large number of tiles that make up a display. A maximum depth value associated with a particular tile can be used to indicate whether a subsequently received polygon or primitive would otherwise be obfuscated and should therefore be discarded or ignored instead of being rasterized. SUMMARY OF THE INVENTION
[0015] According to the present invention, a method for filtering in a tile-based graphics system is provided, comprising: subdividing a rendering space into a plurality of tiles; reading a surface data segment; tessellating the surface data segment to derive a plurality of tessellated primitives; analyzing at least a portion of the segment comprising at least some of the tessellated primitives to determine data representing a bounding depth value determined over at least one tile; using, for each tile containing the segment, the data representing the bounding depth value to determine whether the segment is hidden in the tile; and rendering at least a portion of the segment if it is determined that the segment is not hidden in at least one tile.
[0016] Embodiments of the invention have the advantage that a segment can be extracted from a tile without having to process and execute depth extraction for each individual tessellated primitive. Thus, the invention makes it possible to reduce the amount of processing and memory bandwidth required to render an image comprising a surface data segment.
[0017] This method has the advantage that any displacement of the tessellated primitives from the surface of the segment can be easily taken into account when determining the data representing the boundary depth value determined over the at least one tile.
[0018] In a preferred embodiment, the analysis step further comprises, for each of the majority of tessellated primitives, using the bounding depth value for the tessellated primitive to determine whether the tessellated primitive is hidden in the at least one tile, wherein at least some of the tessellated primitives include the tessellated primitive if it is determined that it is not hidden in the at least one tile. This embodiment has the advantage that only bounding depth values of the unhidden tessellated primitives can be used to determine the data that represent the bounding depth value for the segment. That is, the bounding depth value for the segment is likely to represent a smaller range of depth values, thereby increasing the probability that the segment can be excluded from a tile based on a depth test performed with this bounding depth value.
[0019] Furthermore, in a preferred embodiment, this method can include the exclusion of each tessellated primitive that has been identified as being hidden in at least one tile, so that it is not displayed in a display list for that at least one tile. This saves memory space.
[0020] The boundary depth value assessed across at least one tile can be a boundary depth value for the entire segment. Alternatively, a boundary depth value can be determined for each individual tile in which the segment resides. In this case, the analysis step for each tile containing the segment can include analyzing a corresponding portion of the segment to determine data representing a boundary depth value determined across that tile. Thus, if the segment spans multiple tiles in this case, the boundary depth value determined across at least one tile will encompass multiple boundary depth values (each determined across a specific tile).
[0021] The boundary depth value determined over at least one tile can include a maximum boundary depth value and / or a minimum boundary depth value.
[0022] The data representing the boundary depth value determined over at least one tile can be used to determine whether the segment is hidden in a tile before or after the segment is displayed in the display list for the tile.
[0023] One initial implementation involves displaying at least a portion of each segment in a display list for that tile, provided the segment is not hidden within the tile. This implementation has the advantage of reducing not only the processing power and memory bandwidth required for rendering the image, but also the amount of memory needed to store the display lists for the tiles, since the segment does not need to be displayed in the list for that tile if it is not visible or hidden.
[0024] This configuration may further include: writing the data representing the bounding depth value to a memory; and reading, for each tile whose display list shows at least part of the segment, the data representing the bounding depth value from the memory and using the data representing the bounding depth value to determine whether the segment is hidden in the tile.
[0025] An alternative second embodiment comprises: displaying, for each tile in which the segment is located, at least a part of the segment in a display list for the tile; writing the data representing the bounding depth value determined over the at least one tile into a memory; and wherein the step of using the data representing the bounding depth value for each tile in which the segment is located to determine whether the segment is hidden in the tile further comprises: reading the data representing the bounding depth value from the memory.
[0026] These configurations require that the data representing the boundary depth value determined by at least one tile be stored in memory, which consumes storage space. However, this configuration has the significant advantage that data representing a boundary depth value for the segment can be used to perform a depth test on the segment without having to process the surface data segment when rendering the tile. Thus, this configuration saves memory bandwidth and processing power similarly to the first configuration, since, for example, if the segment can be extracted from a tile, geometric data associated with that segment does not need to be read from a parameter memory.
[0027] This second configuration can, prior to the step of displaying, for each tile in which the segment is located, at least part of the segment in a display list for the tile, also include an additional step comprising using the data representing the boundary depth value determined over the at least one tile to determine whether the segment is hidden in a tile and, if not, removing the segment from the tile so that it is no longer in the tile.
[0028] A suitable device will also be provided. BRIEF DESCRIPTION OF THE FIGURES
[0029] Embodiments of the present invention are now described, but only by way of example, with reference to the accompanying drawings, in which: Fig. 1 is a schematic block diagram showing a device embodying the invention; Fig. 2, Fig. 2a and Fig. 2b illustrate a determination of whether a tessellated surface data segment can be extracted from a tile; Fig. 3 is a flowchart showing the process steps in one embodiment of the invention; Fig. 4 is a flowchart showing the process steps in another embodiment of the invention; Fig. 5 is a flowchart showing an exemplary procedure for determining a boundary depth range for a series of primitives such as triangles; and Fig. 6 is a flowchart that shows an exemplary procedure for determining a boundary depth range for an object such as a surface segment. DETAILED DESCRIPTION OF PREFERRED DESIGNS OF THE INVENTION
[0030] The patent application with publication number GB 2480012 of the applicant discloses a method and a system for tessellating a surface data segment in a tile-based computer graphics rendering system.
[0031] In this system, a surface data segment is tessellated to derive a plurality of tessellated primitives, as described above. Then, for each tile, every tessellated primitive at least partially contained within the tile is displayed in the tile's display list, for example, by storing one or more indexes for each tessellated primitive. However, instead of storing geometric data associated with each individual tessellated primitive in parameter memory, geometric data is stored for the surface data segment from which the tessellated primitives can subsequently be derived again. It will be understood that this approach significantly reduces the amount of data that needs to be stored in parameter memory, albeit at the cost of increasing the computational effort required to render each tile.To render each tile, the surface data segment is re-tessellated to derive the tessellated primitives identified in the respective display list. Each tessellated primitive is then processed as described above.
[0032] Methods and systems for removing primitives that are completely hidden within a tile (i.e., primitives that are not visible at any pixel in the tile) without requiring all the processing necessary in typical techniques for removing hidden areas are known, for example, from the applicant's GB patent No. 2,378,108.
[0033] In this method, primitives that are completely hidden within a tile are weeded out before the hidden area is removed by comparing the depth of each primitive with the depth range stored in the tile's "z-buffer." For example, the minimum depth of a primitive (the depth closest to the viewpoint) can be compared with the greatest or maximum depth indicated by the depth values stored in the "z-buffer" (i.e., the depth furthest from the viewpoint). If the primitive's minimum depth is farther from the viewpoint than the maximum depth value in the "z-buffer," then it is known that the primitive must be completely hidden within the tile, without having to calculate and compare depth values for that primitive at every pixel in the tile. This method thus reduces the amount of processing required to render each tile.
[0034] The term "object" is used below to describe a graphic element such as a primitive or a model, which in the computer graphics industry is generally referred to as a "segment" of surface data.
[0035] The following examples illustrate this using a graphics system that employs a "less than" depth comparison mode. In other words, objects are visible at points where their depth is less than that of other objects at that point. However, it will be understood that graphics systems can use and exchange a number of different depth comparison modes. Other examples of depth comparison modes include "greater than," "equal to or greater than," "equal to or less than," "equal," "not equal to," "always," and "never." For instance, a "less than" depth comparison is used only for clarity, and the following techniques can easily be applied to any suitable depth comparison mode.
[0036] Fig. Figure 1 is a schematic representation showing a device for generating and shading a computer graphics image by means of tessellation in an embodiment of the present invention. The parts comprising this device can be implemented as circuits in a processor such as a graphics processing unit (GPU) or as a program running on a programmable device such as a GPU or CPU.
[0037] A surface data segment 10 is directed to a tessellation processor 20, which divides the segment into a plurality of primitives and, if necessary, moves the primitives from the surface of the segment by applying a user-programmable function or depending on an offset or texture map to derive a plurality of tessellated primitives.
[0038] A segment is typically a parametric function defined by a set of control points that describe the shape of a curve with respect to parameters 't' (for a curved line) or domain coordinates 'u,v' (for a curved surface). An example of a segment used in computer graphics is a Bézier segment, but those skilled in the art will understand that others exist as well.
[0039] As experts know, the tessellation of surface data segments in a graphics pipeline can be supported by a number of application programming interfaces (APIs), such as the Microsoft® Direct3D® 11 API. The Microsoft® Direct3D® 11 API supports displacement mapping, allowing the tessellated primitives to be located at a position offset from the surface of the segment.
[0040] After derivation, the tessellated primitives are passed to a minimum and / or maximum depth calculator 30, which analyzes the segment to determine limiting depth values.
[0041] Optionally, the primitives can first be directed to a clipping and sorting unit (not shown), which removes, for example, rear-facing, screen-off-center, or invisible primitives, and the remaining primitives can then be directed to a projection unit (also not shown), which converts the primitives into screen space.
[0042] In this configuration, the minimum and / or maximum depth calculator 30 determines the minimum and / or maximum depth of the entire tessellated surface data segment, i.e., the depth of the tessellated surface data segment furthest from the viewpoint and / or the depth of the tessellated surface data segment closest to the viewpoint. This can be done by determining and comparing the depths of each of the tessellated primitives that make up the tessellated surface data segment as they are derived. Therefore, there is no need to store the depths of each of the tessellated primitives sequentially. Determining the depth of each of the tessellated primitives can be done using well-known methods, examples of which are given below.
[0043] Determining the minimum and / or maximum depths of a segment using the tessellated primitive data ensures that the minimum and / or maximum depths incorporate the effect of any displacement mapping that may have been applied to the segment. Other methods for determining the minimum and / or maximum depths for a segment are also possible, as those skilled in the art will recognize. For example, an envelope volume surrounding the object can be determined, from which minimum and maximum boundary depth values can be calculated using known techniques. Envelope volumes can have many shapes, such as spheres, cylinders, or rectangular boxes. Many surface segments used in computer graphics, such as Bézier and B-spline types, have the property of lying entirely within the convex hull of their control points. An envelope volume can therefore be determined by analyzing the segments before tessellation.It will be understood that the accuracy of the boundary depth values determined for the object depends on how closely the enclosing volume surrounds the enclosed object, and that care must be taken to consider the effects of displacement mapping.
[0044] In an alternative embodiment, minimum and / or maximum depth data can be determined by analyzing the respective portions of the surface data segment contained in each tile. Surface data segments can be very large and often extend over more than one tile, so that minimum and / or maximum depth data determined for the respective portions of a segment contained in a single tile may represent a considerably smaller range of depth values than minimum and / or maximum depth data determined for the entire segment. A smaller range of depth values increases the chance that the segment can be excluded from the tile before rendering. Those skilled in the art will recognize that several different methods exist for determining minimum and maximum depth data for the portions of a segment contained in a tile, and these include methods that utilize the hull volume and convex hull properties of the segment.
[0045] The presence of a tile unit 40 in the system, which can determine whether a primitive is wholly or partially contained within a tile, makes a method for determining minimum and / or maximum depth values from the tiled tessellated primitives particularly suitable. It will be understood that, in this case, the tile unit 40 must determine which tessellated primitives, and therefore which part of the tessellated surface data segment, are located in each tile. The depths of each of the tessellated primitives forming the tessellated surface data segment within the tile can be determined and compared to derive minimum and / or maximum depth data for the respective parts of the tessellated surface data segment contained in each tile.
[0046] Tile unit 40 divides the render space into a plurality of tiles, each containing a plurality of image pixels. Tiles are typically rectangular, but can also have other shapes.
[0047] For each tile, the tile unit 40 then determines whether each of the tessellated primitives is located (wholly or partially) within that tile. That is, whether at least part of the tessellated primitive is located in a visible region of the tile. This can be done using a number of well-known techniques.
[0048] In some configurations, the tile unit 40 may include a depth test processor 50. If it is determined that an object is located within a tile, the depth test processor compares a minimum or maximum depth value for the object with a depth threshold value for the tile. The comparison test is performed according to the object's depth comparison mode, so the comparison determines whether the object is potentially visible within the tile or whether it is hidden. The depth test processor is typically not a per-pixel test and therefore cannot determine whether an object is definitely visible. However, it can determine whether an object is completely hidden by other objects within the tile. If it is hidden, the object can be excluded and not displayed in the display list for that tile.
[0049] For example, as described in the applicant's GB patent No. 2,378,108, the depth range (minimum and / or maximum depth) of visible primitives in the "z-buffer" for a tile in a system using "partial rendering" can be fed back from a hidden area removal unit 110 to the tile unit 40. As the person skilled in the art will understand, in a "partial rendering" system, some objects located in a tile are displayed in the display list for that tile, and these objects are then rendered using the "z-buffering" technique described above. Subsequently, further objects located in the tile are displayed in the display list for that tile and then rendered. The depth range in the "z-buffer" can be fed back before these subsequent objects are displayed in the display list for the tile, so that they can be used as depth thresholds in a depth test.
[0050] Alternatively, the tile unit 40 can determine minimum and maximum depth thresholds. It is obviously undesirable for the tile unit 40 to duplicate all the depth work performed when removing hidden surfaces. However, the tile unit 40 can, for example, determine conservative minimum and / or maximum depth thresholds for objects added to the display list for a tile intended for use in a rough depth test.
[0051] For example, in a "less than" depth comparison mode, a maximum depth threshold for a tile can be updated each time an object covers the entire tile, provided that this object has a maximum depth closer to the viewpoint than the currently stored maximum depth threshold for visible primitives in the tile. In this case, the maximum depth threshold for the tile can be updated to the maximum depth value of this object. The reason for this is that, since the object covers the tile, the maximum depth threshold of visible primitives in the tile is known to be no greater than the maximum depth value of this object. Therefore, if the object's maximum depth value is closer to the viewpoint than the currently stored maximum depth threshold for the tile, then the maximum depth value for the tile can be updated. A minimum depth threshold for a tile can also be determined by the objects within the tile.
[0052] Fig. Figure 2 shows an example screen port image 200 with several tiles 205 and a tessellated surface data segment 210. The Fig. 2a and Fig. Figure 2b contains diagrams illustrating the minimum and maximum depth values of visible objects in one of the tiles. The point furthest from the viewpoint is assigned a depth value of 1.0, and the nearest point a depth value of 0.0. The range of depth values for visible objects that can be used as thresholds for depth tests is shown by solid lines. The minimum and maximum depth values of two tessellated example segments, 220 and 230, are indicated by dashed lines. These examples show that the depth values for the segments are somewhat conservative, as can be the case with certain methods for deriving the values.
[0053] In this example, an object is excluded if it is determined that it is hidden behind other objects in the image. The key depth is therefore the minimum depth value for the object. As in the example of Fig. 2a, if the minimum depth value of the object (the depth closest to the viewpoint) is closer to the viewpoint than the maximum depth threshold for the tile (i.e., the depth furthest from the viewpoint), then at least part of the object can be visible in that tile. Therefore, the object is not excluded from the tile. In the example of Fig. However, as shown in Figure 2b, the minimum depth value of the object (the depth closest to the viewpoint) is farther from the viewpoint than the maximum depth threshold for the tile. Therefore, it is known that this tessellated surface data segment must be hidden within the tile. Consequently, this object can be excluded from this tile.
[0054] In one embodiment, the depth test is performed using a minimum or maximum depth value defined for a surface data segment. The depth test determines whether the entire segment is hidden within the tile. In another embodiment, the depth test is performed using a minimum or maximum depth value defined for a primitive within the tessellated surface data segment. In this case, the depth test determines whether the primitive is hidden within the tile. Other primitives from the same tessellated surface data segment can be tested independently to determine whether they are hidden within the tile.
[0055] The person skilled in the art will think of further methods for using the minimum and / or maximum depth of the tessellated surface data segment to determine whether the tessellated surface data segment is hidden in a tile.
[0056] If it is determined that an object cannot be removed from a tile, or if no depth test is performed at this stage, then the object is displayed in the display list for that tile. This may involve storing one or more indexes for each tessellated primitive in the display list for the tile, providing a pointer to geometric data associated with the tessellated primitives stored in parameter memory 80. In this example, as described in the system disclosed in GB patent application No. 2480012, no geometric data for each of the tessellated primitives is stored in parameter memory 80; instead, data for the surface data segment is stored from which the tessellated primitives can be re-derived during rendering.For example, if the segment is a Bézier segment, the data can include the control points for the segment along with the applied tessellation factors.
[0057] If it is determined that the entire tessellated surface data segment can be isolated from a tile, then no tessellated primitives will be displayed in the display list for that tile. However, it should be noted that the geometric data for the surface data segment can still be stored in parameter memory 80 if the tessellated surface data segment is potentially visible in other tiles.
[0058] After deriving the display lists for each tile, the display lists are stored in memory 60. Preferably, even if a depth test has already taken place, the minimum and / or maximum depth data for the tessellated surface data segment are stored in memory 70.
[0059] To render each tile, the display list for that tile is read. For tiles whose display list references the surface data segment prior to further processing, the minimum and / or maximum depth data for this surface data segment are read from memory 70 by the depth test processor 90. The depth test processor 90 can then perform a first or further depth test, e.g., using the method described above. Other methods are also possible and will occur to a person skilled in the art.
[0060] It will be understood that performing a depth test at this stage can be more accurate than performing one before tiling, and therefore is more likely to result in the surface data segment being rejected from a tile. This is because minimum and / or maximum depth thresholds for the tile, against which the minimum and / or maximum depths of the tessellated segment can be compared, can be determined directly from the z-buffer of the Hidden Surface Distance Unit 110. Minimum and / or maximum depths determined in this way can be more accurate than those derived in the Tile Unit 40 because they are not affected by factors such as conservative envelopes or the derivation of threshold data only from objects that cover an entire tile.Even if a depth test was performed before tiling, if the segment was not excluded from all tiles, it can be advantageous to store the minimum / maximum depth values for the segment and perform an additional depth test after tiling, before each tile is rendered, although this has the disadvantage of requiring additional storage space to store the min / max data for the segment.
[0061] If it is determined that the surface data segment can be isolated from a tile, then it is advantageously unnecessary for that tile to process tessellated primitives associated with that surface data segment. Therefore, there is no need to re-tessellate the surface data segment to re-derive these tessellated primitives displayed in the display list for that tile.
[0062] If it is determined that the surface data segment can be visible in the tile, then the tessellation processor 100 reads the geometric data associated with the surface data segment and re-tessellates the surface data segment to re-derive each of the tessellated primitives identified in the display list for that tile.
[0063] Each of these tessellated primitives is then processed to render the image using well-known techniques as described above.
[0064] Each of the tessellated primitives can be directed to the Hidden Surface Removal Unit 110, which removes all surfaces not visible in the tile, and the resulting pixel data can be directed to a Texture and Shading Unit 120, which applies pixel or texture shading before writing final pixel values to memory for display.
[0065] Fig. Figure 3 is a flowchart illustrating an embodiment of the present invention. In step 300, a surface data segment is tessellated to derive a plurality of tessellated primitives that can be moved from the surface of the surface data segment. In step 310, minimum and / or maximum depth data for the tessellated surface data segment are then determined from the tessellated primitives. In step 320, for each tile containing the tessellated surface data segment, the minimum and / or maximum depth data for the tessellated surface data segment can then be used to determine whether the tessellated surface data segment is hidden within the tile.
[0066] If it is determined that the tessellated surface data segment is hidden within the tile, then in step 340, the tessellated surface data segment is extracted from that tile. If it is determined that the tessellated surface data segment is not hidden within the tile, then in step 330, a display list is derived for that tile, showing the tessellated primitives that are located within the tile. Additionally, the minimum and / or maximum depth data for the tessellated surface data segment can be stored. Display lists and minimum and / or maximum depth data are stored in memory location 350.
[0067] To render each tile, in step 360, for each tile containing the tessellated surface data segment, the minimum and / or maximum data values for the surface data segment are read and used to determine whether the tessellated surface data segment is hidden within that tile. If it is determined that the tessellated surface data segment is hidden within the tile, then in step 380, this tessellated surface data segment is removed from the tile and no further processing occurs. If it is determined that the tessellated surface data segment is not hidden, then in step 390, each of the tessellated primitives within that tile is processed to render the tile.In the embodiment described above, this involves re-tessellating the surface data segment stored in memory in order to re-derive at least those tessellated primitives that are displayed in the display list for the tile, and then processing each of these tessellated primitives using well-known techniques.
[0068] Fig. Figure 4 is a flowchart illustrating another embodiment of the present invention. In step 400, a surface data segment is tessellated to derive a plurality of tessellated primitives that can be moved from the surface of the surface data segment. In step 410, for each tile containing a tessellated primitive, minimum and / or maximum depth values for the primitive are used to determine whether the primitive is hidden within the tile.
[0069] If it is determined that the tessellated primitive is hidden within the tile, the tessellated primitive is removed from that tile in step 430. If it is determined that the tessellated primitive is not hidden within the tile, then the minimum and / or maximum depth data for the unhidden primitive in the surface segment can be determined in step 420. In step 440, a display list is derived for the tile, showing the tessellated primitives that are not hidden and are located within the tile. Additionally, the minimum and maximum depth data for the tessellated surface data segment can be stored. Display lists and minimum and / or maximum depth data are stored in memory location 450.
[0070] To render each tile, in step 460, for each tile containing the tessellated surface data segment, the minimum and / or maximum depth data for the surface data segment are read and used to determine whether the tessellated surface data segment is hidden within that tile. If it is determined that the tessellated surface data segment is hidden within the tile, then in step 480, this tessellated surface data segment is removed from the tile and no further processing takes place. If it is determined that the tessellated surface data segment is not hidden, then in step 490, each of the tessellated primitives within that tile is processed to render the tile.In the configuration described above, this involves re-tessellating the surface data segment stored in memory in order to derive at least the tessellated primitives displayed in the display list for the tile and then to process each of these tessellated primitives using well-known techniques.
[0071] Fig. Figure 5 is a flowchart showing a procedure that can be used by a minimum and / or maximum depth calculator 30 to determine a limiting depth value for a set of one or more primitives, such as those that could be generated by tessellating a surface data segment. This example shows the determination of a minimum depth value.
[0072] At 500, a primitive is read, and at 510, a vertex of that primitive is read. Typically, a vertex comprises coordinates X, Y, and Z, where the Z-coordinate is the depth value. At 520, if the vertex is the first vertex from the first primitive in the set of primitives, the vertex's Z-coordinate is stored at 530. This provides an initial value for subsequent comparisons. For all subsequent vertices, at 540, the vertex's Z-coordinate is compared to a Z-value previously stored at 530 to determine if it is smaller. If smaller, the vertex's Z-coordinate is stored at 530, replacing any previously stored values. At 550, a test is performed to determine if the vertex is the last vertex in the primitive. If not, the process returns to 510, and the next vertex of the primitive is processed similarly.After processing the last vertex in a primitive, a test is performed at 560 to determine if this primitive is the last primitive in the sentence. If not, the process returns to 500, and the next primitive is read and processed. After processing the last primitive in the sentence, the Z-value stored at 530 is the smallest Z-value of all the vertices examined.
[0073] The expert will recognize that the method of Fig. 5 can be modified to determine a maximum bounding depth value for a set of primitives or to generate both minimum and maximum bounding depth values for a set of primitives in just one pass through the primitive data.
[0074] Fig. Figure 6 is a flowchart showing a procedure that can be used by a minimum and / or maximum depth calculator 30 to determine a boundary depth value for a surface data segment. In this example, a minimum depth value is determined from vertices that are the control points of the surface segment. The control points of the surface segment form a convex hull, which, as is known, bounds the segment.
[0075] At 600, an object is read, and at 610, a vertex of the object is read. At 620, the vertex is optionally checked for relevance, since it is well known that for curves such as the B-spline, the curve is bounded by the convex hull of a set of neighboring control points, and that the number of neighboring points defining the convex hull depends on the degree of the curve. The relevance test can be particularly useful when determining an hull volume for the portion of a surface segment that lies within a given tile, because only the control points in and around that tile define the convex hull for the surface segment within the tile. An hull volume determined by a smaller number of control points can be smaller and can therefore allow for more effective weeding out than an hull volume calculated using all control points for the surface segment.If it is determined that a corner point is not relevant, the process continues at 660.
[0076] If the vertex at 630 is the first relevant vertex of the surface segment, the vertex's Z-coordinate is stored at 640. This provides an initial value for further comparisons. For all subsequent vertices, at 650 the vertex's Z-coordinate is compared to a Z-value previously stored at 640 to determine if it is smaller. If it is smaller, the vertex's Z-coordinate is stored at 640, replacing a previously stored value.
[0077] At step 660, it is checked whether the vertex is the last vertex in the surface segment. If not, the process returns to step 610. After processing the last vertex in the surface segment, the Z-value stored at step 640 is the smallest Z-value of all relevant vertices examined.
[0078] The expert will recognize that the method of Fig. 6 can be modified to determine either a maximum value or both minimum and maximum limit depth values as required.
[0079] A person skilled in the art will recognize that functions, techniques, or procedures can be implemented wholly or partially using a dedicated circuit, an application-specific integrated circuit, a programmable logic array, a field-programmable gate array, or the like. This may include, for example, hardware in the form of circuits. Such a circuit may include transistors and / or other hardware elements available in a manufacturing process. Such transistors and / or other elements can be used to form circuits or structures that include, for example, memories such as registers, flip-flops, or latches; logical operators such as Boolean operations; mathematical operators such as adders, multipliers, or shifters; and interconnects. Such elements may be provided as custom circuits or as standard cell libraries, macros, or at other levels of abstraction.Such elements can be interconnected in a specific arrangement. This can include fixed-function circuits and / or circuits that can be programmed to perform one or more functions; such programming can be provided via a firmware or software update or via control mechanisms. For example, hardware logic includes circuits that implement a fixed-function operation, a state machine, or a process.
[0080] It should also cover any software that "describes" or defines the configuration of hardware that implements a module, functionality, component, or logic as described above, such as HDL (Hardware Description Language) software used for designing integrated circuits or configuring programmable chips to perform desired functions. That is to say, a computer-readable storage medium may be provided on which computer-readable program code is encoded for creating a processing unit configured to perform any of the procedures described herein or to create a processing unit comprising any device described herein.
Claims
[1] Method for removing hidden tessellated primitives in a tile-based graphics system, comprising: Dividing a rendering space into a plurality of tiles; Reading a surface data segment (10); Tessellating the surface data segment (10) to derive a plurality of tessellated primitives (300); Analyzing at least a part of the segment that includes at least some of the tessellated primitives to determine data that represent a bounding depth value determined over at least one tile (310); Use, for each tile containing segment (10), the data representing the bounding depth value to determine whether the segment is hidden in the tile (320); and Rendering at least part of the segment if it is determined that the segment is not hidden in at least one tile (370). [2] Method according to claim 1, wherein the analysis step (310) further comprises deriving a boundary depth value for each of the plurality of tessellated primitives; and comparing the boundary depth values for at least some of the plurality of tessellated primitives to derive the data representing the boundary depth value determined over the at least one tile. [3] Method according to claim 2, wherein the analysis step (310) further comprises using, for each of the plurality of tessellated primitives, the limiting depth value for the tessellated primitive to determine whether the tessellated primitive is not hidden in the at least one tile, wherein the at least some of the tessellated primitives include the tessellated primitive when it is determined that it is not hidden in the at least one tile. [4] Method according to a previous claim, wherein the limiting depth value determined over the at least one tile is a limiting depth value for the entire segment. [5] Method according to a previous claim, wherein the analysis step (310) comprises analyzing, for each tile in which the segment is located, a corresponding part of the segment to determine data representing a boundary depth value determined over that tile. [6] Method according to a previous claim, wherein the limit depth value determined over the at least one tile comprises a maximum limit depth value and / or a minimum limit depth value. [7] Method according to a previous claim, further comprising: displaying, for each tile in which the segment is located, at least a part of the segment in a display list for the tile, when it is determined that the segment is not hidden in the tile (330). [8] Method according to claim 7, further comprising: writing the data representing the boundary depth value to a memory (70); and reading, for each tile whose display list shows at least a part of the segment representing the boundary depth value, from the memory (70) and using the data representing the boundary depth value to determine whether the segment is hidden in the tile. [9] A method according to any one of claims 1 to 6, further comprising: displaying, for each tile in which the segment is located, at least a part of the segment in a display list for the tile (330); writing the data representing the bounding depth value determined over the at least one tile to a memory (70); and wherein the step of using, for each tile in which the segment is located, the data representing the bounding depth value to determine whether the segment is hidden in the tile, further comprises: reading the data representing the bounding depth value from the memory (70). [10] Method according to claim 9 depending on claim 4, further comprising separating each tessellated primitive which is determined to be hidden in the at least one tile (340). [11] Method according to claim 9 or 10, further comprising an additional step prior to the step of displaying, for each tile in which the segment is located, at least a part of the segment in a display list for the tile (330), comprising using the data representing the boundary depth value determined over the at least one tile to determine whether the segment is hidden in a tile and, if so, excluding the segment from the tile. [12] System for separating hidden tessellated primitives in a graphics system with a rendering space divided into a plurality of regions, each containing several pixels, the system comprising: an interface configured to receive a surface data segment (10); a tessellation processor (20) configured to tessellate the surface data segment (10) to derive a plurality of tessellated primitives; a depth calculator (30) configured to analyze at least a part of the segment comprising at least some of the majority of the tessellated primitives in order to determine data representing a bounding depth value determined over at least one tile; a depth test processor (50) configured to use, for each tile containing the segment, the data representing the limiting depth value to determine whether the segment is hidden in the tile; and a renderer configured to render at least part of the segment when it is determined that the segment is not hidden in at least one tile. [13] System according to claim 12, wherein the depth calculator (30) further comprises a comparator logic configured to derive a boundary depth value for each of the plurality of tessellated primitives and to compare the boundary depth values for at least some of the plurality of tessellated primitives in order to derive the data representing the boundary depth value determined over the at least one tile. [14] System according to claim 13, wherein the depth test processor (50) is further configured to use, for each of the plurality of primitives, the boundary depth value for the tessellated primitive to determine whether the tessellated primitive is hidden in the at least one tile; and wherein the comparator logic is configured to compare the boundary depth value of the tessellated primitive when it is determined that this tessellated primitive is not hidden in the at least one tile. [15] System according to one of claims 12 to 14, wherein the limit depth value determined over the at least one tile is a limit depth value for the entire segment. [16] System according to any one of claims 12 to 15, wherein the depth calculator (30) is configured to analyze, for each tile in which the segment is located, a corresponding part of the segment in order to determine data that represent a boundary depth value determined via that tile. [17] System according to any one of claims 12 to 16, wherein the boundary depth value determined over the at least one tile comprises a maximum boundary depth value and / or a minimum boundary depth value. [18] System according to any one of claims 12 to 17, further comprising a display list generator configured to display, for each tile in which the segment is located, at least a part of the segment in a display list for the tile, when it is determined that the segment is not hidden in the tile. [19] System according to claim 18, further comprising a write interface configured to write the data representing the boundary depth value to a memory (70); a read interface configured to read, for each tile whose display list shows at least a part of the segment representing the boundary depth value data from the memory (70); and a depth test processor (90) configured to use, for each tile whose display list shows at least a part of the segment representing the boundary depth value data, to determine whether the segment is hidden in the tile. [20] System according to any one of claims 12 to 17, further comprising a display list generator configured to display, for each tile in which the segment is located, at least a part of the segment in a display list for the tile; a write interface configured to write the data representing the limit depth value determined over the at least one tile to a memory (70); and wherein the depth test processor (50) is further configured to read the data representing the limit depth value from the memory (70). [21] System according to claim 20 depending on claim 16, further comprising an object segregation logic configured to segregate each tessellated primitive that is determined to be hidden in the at least one tile. [22] System according to claim 20 or 21, wherein the depth test processor (50) is further configured to use the data representing the limit depth value determined over the at least one tile to determine whether the segment is hidden in a tile, and the system further comprises object removal logic configured to remove the segment from the tile so that the segment is no longer in that tile when it is determined that the segment is hidden in that tile, before the display list generator, for each tile in which the segment is located, displays at least a part of the segment in a display list for the tile. [23] Computer-readable storage medium on which computer-readable code for generating a graphics processing system is encoded, configured to perform the method according to claims 1 to 11.
Citation Information
Patent Citations
3D graphics generator
GB2378108A
Z-culling method, three-dimensional graphics processing method and apparatus threrof
US20120299910A1
Method and apparatus for culling polygons
US6246415B1
Apparatus, system, and method for Z-culling
US7450120B1
Tiled prefetched and cached depth buffer
US8089486B2