Low resolution depth pre-process
By drawing occlusion geometry at low resolution in computer graphics systems and pre-filling depth data, the problem of excessive painting in computer graphics systems is solved, and resource conservation and processing efficiency are improved.
Patent Information
- Application Number
- CN201980034802.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2018-05-25
- Filing Date
- 2019-05-13
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2039-05-13
AI Technical Summary
The prior art is difficult to effectively reduce excessive painting in computer graphics systems, resulting in waste of resources and inefficient processing.
Full resolution drawing is performed by drawing the occlusion geometry at a resolution lower than full resolution, sampling the depth values of its pixels, and pre-filling the GPU depth data based on these depth values to remove unnecessary pixels.
Reduces the use of resources required to draw images, improves processing efficiency, and effectively reduces the phenomenon of over-painting.
Smart Images

Figure CN112189219B_ABST
Abstract
Description
Background Art
[0001] The present disclosure relates to computer graphics systems and, more particularly, to rendering images that include objects at different depths.
[0002] A computer graphics system can draw an image based on multiple objects from the perspective of a camera. As in the real world, when a virtual object is viewed from a specific perspective, other objects may block (or occlude) the view of all or part of the object. Generally speaking, closer objects occlude farther objects. In a computer graphics system, overdrawing occurs when pixels that already contain another object are used to draw a closer object. The existing pixels are replaced with pixels for the closer object. In general, overdrawing is considered wasteful because the properties of each overdrawn pixel are determined multiple times using additional processing resources.
[0003] One solution to reduce or eliminate overdraw is to use a depth pre-pass available on modern graphics processing units (GPUs). In this scheme, each object is drawn twice. In the first iteration, only the closest depth per pixel is recorded to the depth buffer. In the second iteration, only the closest object passes the depth buffer test and writes the pixel data. This avoids overdrawing, but at the cost of processing each object twice. This cost can sometimes outweigh the benefits of eliminating overdrawing, resulting in a net loss.
[0004] Another solution to reduce over-drawing is to perform low-resolution occlusion drawing, usually using a central processing unit (CPU). Low-resolution occlusion geometry is drawn to an occlusion buffer, for example, a box for a building or a rectangle for a wall or fence. This occlusion drawing is used to test a single bounding volume for each object (usually a box). If the entire bounding box is occluded, the software can prevent the object from being drawn. However, objects may often be only partially occluded, so software occlusion drawing can still draw the entire object, resulting in drawing many pixels that are occluded and subsequently over-drawn.
[0005] Therefore, there is a need in the art for improved graphics processing for determining whether to draw a pixel. Summary of the invention
[0006] A simplified summary of one or more implementations of the present disclosure is presented below in order to provide a basic understanding of these implementations. This summary is not an extensive overview of all contemplated implementations, and it is neither intended to identify the key or essential elements of all implementations nor to describe the scope of any or all implementations. Its sole purpose is to present some concepts of one or more implementations of the present disclosure in a simplified form as a prelude to a more detailed description presented later.
[0007] In one example, a method of rendering an image at full resolution includes rendering an occluding geometry at a reduced resolution that is lower than the full resolution. The method may include sampling depth values of pixels of the occluding geometry. The method may include pre-populating GPU depth data (e.g., layered depth buffer metadata) based on a plurality of sampled depth values. The method may include culling at least one tile or pixel from a full resolution rendering process in response to a depth of at least one tile or pixel being further than a corresponding depth value in the GPU depth data. The method may include performing a full resolution rendering process on the remaining tiles or pixels to generate an image at full resolution. The method may include displaying the image on a computer display at full resolution.
[0008] In another example, a method of rendering an image at full resolution includes rendering occluding geometry at a reduced resolution that is lower than the full resolution. The method may include sampling depth values of pixels of the occluding geometry. The method may include pre-filling a full-resolution depth buffer based on a plurality of sampled depth values. The method may include culling at least one pixel from a full-resolution rendering process in response to a depth of at least one pixel being further than a corresponding depth value stored in a pre-filled depth buffer. The method may include performing a full-resolution rendering process on the remaining pixels. For example, the method may be used when a layered depth buffer value cannot be directly accessed, or when a layered depth buffer is not implemented on a current GPU.
[0009] In another example, a computing device for drawing an image at full resolution may include a memory that stores one or more parameters or instructions for executing an operating system and one or more applications. The computing device may include a graphics processing unit (GPU) for drawing frames of one or more applications for display on a display device coupled to the computing device, the GPU including a depth buffer with or without layered depth. The computing device may include at least one processor coupled to the memory and the GPU. The at least one processor may be configured to draw occluding geometry at a reduced resolution lower than the full resolution. The at least one processor may be configured to sample depth values of pixels of the occluding geometry. The at least one processor may be configured to pre-fill metadata of the layered depth buffer based on a plurality of sampled depth values, or to pre-fill full resolution depth values. The GPU may be configured to cull at least one tile or pixel from the full resolution drawing process in response to the depth of at least one tile or pixel being farther than the corresponding depth value in the layered depth metadata buffer or the depth buffer. The GPU may be configured to perform a full resolution drawing process on the remaining tiles or pixels to generate an image at full resolution.
[0010] In another example, a computer-readable medium may include code that is executable by one or more processors for rendering an image at full resolution. The computer-readable medium may include code for rendering occluding geometry at a reduced resolution lower than full resolution. The computer-readable medium may include code for sampling depth values of pixels of occluding geometry. The computer-readable medium may include code for biasing multiple sampled depth values toward another depth value away from the camera. The computer-readable medium may include code for pre-filling layered depth buffer metadata or full-resolution depth based on the biased depth value. The computer-readable medium may include code for excluding at least one tile or pixel from the full-resolution rendering process in response to the depth of at least one tile or pixel being farther than the corresponding depth value in the layered depth buffer metadata or depth buffer. The computer-readable medium may include code for performing a full-resolution rendering process on the remaining tiles or pixels to generate an image at full resolution.
[0011] Additional advantages and novel features associated with the implementation of the present disclosure will be set forth in part in the description that follows, and in part will be more apparent to those skilled in the art upon examination of the following or through practice of the same. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In the attached picture:
[0013] Figure 1 is a schematic block diagram of an example system for culling occluded pixels from a graphics pipeline using a low-resolution depth pre-pass according to an implementation of the present disclosure;
[0014] Figure 2 is a drawn image of the example object;
[0015] Figure 3 According to the implementation of the present disclosure, Figure 2 a representation of example occluding geometry for an example object;
[0016] Figure 4 yes Figure 2 A rendered image of an example object including missing pixels due to undersampling;
[0017] Figure 5 is a conceptual diagram showing a cross-sectional view of an example object sampled into low-resolution screen space;
[0018] Figure 6 is a conceptual diagram illustrating an example per-sample biasing technique for converting Figure 5 The objects are sampled into low-resolution screen space;
[0019] Figure 7 is a conceptual diagram showing a cross-sectional view of an example concave object sampled into low-resolution screen space;
[0020] Figure 8 is a conceptual diagram illustrating an example phantom point biasing technique according to an implementation of the present disclosure;
[0021] Fig. 9 According to the implementation of the present disclosure, it is shown that Figure 7 Conceptual diagram of the example ghost point biasing technique for sampling objects into low-resolution screen space;
[0022] Fig.10 It shows that when drawing Figure 2 Schematic diagram of overpainting when using an example object;
[0023] Fig.11 is a schematic diagram showing overpainting after pre-filling a layered depth buffer using a low-resolution depth pre-pass according to an implementation of the present disclosure;
[0024] Fig.12 is a flow chart of an example method for drawing an image by culling occluded pixels from a graphics pipeline using a low-resolution depth pre-pass according to an implementation of the present disclosure; and
[0025] Fig.13 is a schematic block diagram of an example computer device according to implementations of the present disclosure. DETAILED DESCRIPTION
[0026] The present disclosure provides systems and methods for drawing images on a display with relatively low latency (compared to current solutions). In graphics-intensive computer applications (e.g., video games), the user experience is often improved by increasing the speed at which images are drawn by a particular system. For example, faster drawing can achieve a higher frame rate, which the user perceives as smoother motion. As another example, faster drawing can enable the use of higher resolutions, more effects, or more content while keeping the frame rate constant.
[0027] For example, in one implementation, the present disclosure provides a system and method for performing low-resolution rendering of an image to determine the depth of visible pixels to be used for occlusion culling. Low-resolution rendering can use far fewer resources than performing full-resolution rendering of an image. For example, low-resolution rendering performed at one-eighth of the full resolution can use only one-sixty-fourth of the pixels. In one implementation, the low-resolution pixels can correspond to tiles of the full-resolution image, so culling can be performed at a tile granularity level. Therefore, by using low-resolution rendering to cull groups of pixels corresponding to occluded portions of an object from the full-resolution rendering, the disclosed technology can reduce resource usage (e.g., time and processing resources) for rendering an image.
[0028] One problem with using reduced resolution rendering for occlusion culling is the possibility of undersampling. Since each pixel in the reduced resolution rendering can represent multiple pixels in the full resolution rendering, the reduced resolution rendering may not capture some details of the object. Of particular concern is that by sampling the reduced resolution depth rendering, farther or deeper features may not be captured. For example, sampling a concave surface at a low resolution may not capture the deepest point of the concave surface. If the feature group corresponding to the deeper features is incorrectly culled from the full resolution rendering due to undersampling, the final image may include missing pixels, which may be noticeable to the user. Therefore, the present disclosure provides several techniques for biasing samples from the reduced resolution depth rendering to prevent incorrect culling.
[0029] Reference now Figure 1 , the example computer system 100 includes a computer device 110. For example, the computer device 110 can be any mobile or fixed computer device, including but not limited to a desktop computer or a laptop computer or a tablet computer, a cellular phone, a gaming device, a mixed reality or virtual reality device, a music device, a television, a navigation system, a camera, a personal digital assistant (PDA), a handheld device, any other computer device with wired and / or wireless connection capabilities to one or more other devices, or any other type of computerized device. The computer device 110 may include a display 112 for displaying a drawn image. The display 112 may be updated periodically at a refresh rate (e.g., 30 Hz-90 Hz). The computer device 110 may use a graphics processing unit (GPU) 120 to provide an image for display on the display 112, the graphics processing unit (GPU) 120 including a graphics queue 124 for receiving commands to draw objects in an image, an occlusion culling component 134 for culling pixel groups based on a layered depth buffer 130, and a drawing pipeline 126 for painting the remaining pixel groups that were not culled.
[0030] Computer device 110 may also include CPU 114, which executes instructions stored in memory 116. For example, CPU 114 may execute operating system 140 and one or more applications 150. Operating system 140 may include display controller 142 to control GPU 120. For example, display controller 142 may send drawing commands to GPU 120. In some cases, display controller 142 may execute on CPU 114 to generate reduced resolution occlusion geometry 155.
[0031] The computer device 110 may include a memory 116 and a CPU 114, which is configured to control the operation of the computer device 110. The memory 116 may be configured to store data and / or computer executable instructions that define and / or are associated with an operating system 140 and / or an application 150, and the CPU 114 may execute the operating system 140 and / or the application 150. Examples of the memory 116 may include, but are not limited to, types of memory available to a computer, such as random access memory (RAM), read-only memory (ROM), tape, magnetic disk, optical disk, volatile memory, non-volatile memory, and any combination thereof. The memory 116 may store a local version of an application executed by the CPU 114.
[0032] CPU 114 may include one or more processors for executing instructions. Examples of CPU 114 may include, but are not limited to, any processor specifically programmed as described herein, including a controller, a microcontroller, an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), a system on a chip (SoC), or other programmable logic or state machine. CPU 114 may include other processing components, such as an arithmetic logic unit (ALU), registers, and a control unit.
[0033] Operating system 140 may include instructions, such as applications 150, stored in memory 116 and executable by CPU 114. Operating system 140 may include display controller 142 for controlling GPU 120. For example, display controller 142 may receive objects 148 from applications 150 and provide commands 146 to GPU 120 to perform one or more specific graphics processing operations, such as drawing a source image or performing adjustments.
[0034] The GPU 120 may include one or more processors and dedicated hardware for image processing. In implementation, the GPU 120 may be integrated with the CPU 114 on the motherboard of the computer device, or may be a discrete chip. The GPU 120 may include a dedicated memory 122. The GPU 120 may be connected to the display 112 via a display interface 138. The GPU 120 may periodically scan out an image from an image buffer 128 to the display 112 via the display interface 138 according to the refresh rate of the display 112. The GPU 120 may include a graphics queue 124, a rendering pipeline 126, a layered depth buffer 130, and an occlusion culling component 134. The graphics queue 124 may receive commands for drawing images from the display controller 142. The graphics queue 124 may generally provide commands to the rendering pipeline 126. The rendering pipeline 126 may perform multiple stages of image processing. For example, the rendering pipeline 126 may include an input-assembler stage, a vertex shader stage, a hull shader stage, a tessellator stage, a domain shader stage, a geometry shader stage, a stream output stage, a rasterizer stage, a pixel shader stage, and an output merger stage.
[0035] The GPU 120 may include GPU depth data 129 for storing depth data associated with full-resolution rendering. For example, the GPU depth data 129 may include a layered depth buffer 130, which may also be referred to as a layered z-buffer or HZB. The layered depth buffer 130 may also include metadata 132, which may include additional information for groups of pixels. For example, the layered depth buffer 130 and metadata 132 may include information for 8×8 groups of pixels called tiles. The layered depth buffer 130 contains a minimum depth value and / or a maximum depth value for the set of pixels contained in the tile. These minimum depth values and maximum depth values may be conservatively quantized (e.g., using 14 bits or 16 bits), while the full-resolution depth data 136 may be stored using more bits (e.g., 32 bits). Therefore, the layered depth buffer 130 may have lower precision than the actual GPU 120 calculations. The metadata 132 may also include clear status bits and other data for accelerating depth testing or clearing operations. The layered depth buffer 130 minimum depth value and maximum depth value may be packed with other values of the metadata 132 to form a complete machine word, such as 32-bit data, or they may be stored separately.
[0036] The occlusion culling component 134 may be a hardware accelerator for culling pixels or tiles based on the layered depth buffer 130. In a first pass, the occlusion culling component 134 may receive a tile and determine whether the tile is occluded based on the layered depth buffer 130, for example, by comparing the depth range of the tile being drawn to the minimum and maximum depth values. In a second pass, if the tile passes occlusion culling, the occlusion culling component 134 may determine whether individual pixels are occluded based on the layered depth buffer 130, and finally test individual pixels against the full resolution depth buffer if necessary. The implementation of the occlusion culling component 134 may vary based on the GPU 120, and once the layered depth buffer 130 and / or metadata 132 are populated, the implementation of the occlusion culling component 134 may be transparent to the application 150.
[0037] In an example, the display interface 138 may be communicatively coupled to the GPU 120 and / or the memory 122 for communicating with the display 112. The display interface as referred to herein may also include various types of ports capable of enabling communication between the computer device 110 and the display 112, including a High Definition Multimedia Interface (HDMI) port, a Display Serial Interface (DSI) port, a Mobile Industry Processor Interface (MIPI) DSI port, a Universal Serial Bus (USB) port, a FireWire port, or other embedded or external wired or wireless display ports.
[0038] The application 150 may include a graphics component involved in drawing an image to the display 112. For example, the application 150 may include a video game that draws a series of images to the display 112 at a frame rate. In general, application developers may seek to improve the user experience by maximizing frame rate, resolution, color depth, or other image attributes, or by letting the user select these attributes. One or more applications 150 may include a depth pre-process component 152 for culling occluded pixel groups from an image using reduced resolution drawing before drawing the image at full resolution. The depth pre-process component 152 may include a depth drawer 154 and a sampler 156, the depth drawer 154 being used to draw occluded geometry 155 at a reduced resolution lower than the full resolution, and the sampler 156 being used to pre-fill the GPU depth data 129 (e.g., the layered depth buffer 130, metadata 132, or depth data 136) based on the sampled depth values 158 of the occluded geometry 155.
[0039] The depth renderer 154 may include instructions for performing only depth rendering of the scene to generate occlusion geometry 155. The occlusion geometry 155 may have a resolution lower than the final full-resolution image. For example, the lower resolution may be one-quarter, one-eighth or lower of the full resolution. The depth renderer 154 may instruct the CPU 114 or the GPU 120 to perform only depth rendering. Since only depth rendering is performed at a lower resolution and some processing-intensive pixel-level operations can be omitted, both the CPU 114 and the GPU 120 may be able to quickly perform only depth rendering. The application designer may select whether the CPU 114 or the GPU 120 performs only depth rendering based on the specific needs of the application 150 and other work being performed on each of the CPU 114 or the GPU 120. The occlusion geometry 155 generated by only depth rendering may include a depth value for each pixel in the screen space in only depth rendering. The depth value 158 may be the depth of the nearest object / surface being rendered. A larger depth value 158 may indicate that the object is farther away from the camera or screen, or if the application is employing a Reverse-Z algorithm, a smaller depth value 158 may indicate that the object is farther away from the camera.
[0040] The depth renderer 154 may omit some scene objects from the depth-only rendering. In particular, objects that are bad occluders may be omitted from the depth-only rendering. For example, small objects, transparent objects, and objects that include holes may not completely occlude objects behind the bad occluders. Due to low resolution and undersampling, bad occluders may also have a larger occlusion effect than expected, resulting in incorrect images. That is, pixels behind the bad occluder may be culled based on depth, resulting in missing pixels visible adjacent to the bad occluder or visible through the bad occluder. The bad occluder may be identified by the number of pixels covered, by the screen space area projected by it, by manual exclusion from occlusion rendering, or by other means. Therefore, the depth renderer 154 may omit the bad occluder from the depth-only rendering, but such a bad occluder may be included in the full-resolution rendering process.
[0041] The sampler 156 may sample the depth value 158 of the occluding geometry 155 for use in pre-populating the layered depth buffer 130 of the GPU depth data 129, the metadata 132, or the full-resolution depth data 136. In an implementation, the sampler 156 may be biased to generate conservative depth sample values. That is, the sampler 156 may generate farther depth values to prevent incorrect culling of pixels that may be close to the occluding geometry 155. For example, the sampler 156 may use techniques such as global biases, rounding biases, and per-sample biases to conservatively bias depth samples while maintaining actual depth values close to the occluding geometry 155 in order to obtain the benefits of culling. Per-sample biases may include taking the farthest depth of a neighboring pixel and its phantom point. See below for more information. Figure 5-Figure 9 These sampling techniques are described in further detail.
[0042] Reference now Figure 2 , example image 200 represents an example object 210 that can be drawn via GPU 120. Object 210 may have geometry that may be overdrawn and may consume a large amount of graphics processing resources. For example, the illustrated object 210 may be a fractal object consisting of multiple cubes with hemispherical depressions on the surface. The spherical depression may be a texture-based effect that does not exist in the underlying object. As shown, the surface of the cube overlaps the surface of other cubes, which typically causes the visible portion of each cube to be a rectangular prism. Therefore, if each surface is drawn, GPU 120 may perform significant overdrawing on previously drawn pixels. In addition, the full-resolution depth pre-process will still include drawing each cube. Boundary volume software occlusion culling may not be particularly useful because each cube only blocks a portion of other cubes, and therefore, software occlusion culling may cull a few cubes from the drawing process, while a large amount of overdrawing can be retained.
[0043] Figure 3 Illustrated is an example reduced resolution occlusion geometry 300 (i.e., and an example of occlusion geometry 155) of an object 210 that may be generated by the depth renderer 154 of the depth pre-process component 152. The reduced resolution occlusion geometry 300 includes only depth values for the object 210. Pixels that are closer to the camera (shallower depth) are shown in darker shades, while pixels that are farther from the camera (darker) are shown in lighter shades.
[0044] Figure 4An example image 400 of a portion of an object 210 is illustrated. The image 400 may include missing pixels 410, 420 resulting from undersampling. The missing pixels 410 may be located at the location of a group of pixels that were culled based on the reduced resolution occluding geometry 300. Therefore, when the full resolution rendering process compares the actual farthest point of each tile with the sampled value of the reduced resolution occluding geometry 300, the sampled point appears to occlude the tile, and the tile is incorrectly culled. Other missing pixels 420 may be due to the edge of a surface not actually occluding a more distant surface adjacent to the edge in the 2D image. That is, due to undersampling, even if the high resolution rendering does not include pixels for the closer surface for the adjacent pixel, in the high resolution rendering, the sampled value of the closer surface is applied to the adjacent pixel, and the pixel appears to be occluded.
[0045] Figure 5 5 is a conceptual diagram 500 showing a cross-sectional view of an object 510 sampled into a low-resolution screen space. The low-resolution screen space may be represented by pixels 520, 522, 524. The full-resolution screen space may be represented by pixels 540. The object 510 may have a slope such that the depth of the object 510 varies when sampled at different locations corresponding to the pixels 520, 522, 524 to obtain depth values 530, 532, 534. When the occlusion culling component 134 of the GPU 120 uses the depth values 530, 532, 534 to cull the pixels 540 in the full-resolution screen space, the depth value 532 may represent the pixels 540 that actually correspond to different depths. For culling purposes, portions of the object 510 that are closer than the depth value 532 will not be culled, but pixels 540 corresponding to portions of the object 510 that are farther than the depth value 532 may be culled because, even though the depth value 532 and the pixels 540 may represent the same surface of the object 510, the occlusion culling component 134 may determine that portions of the object are occluded by the pixels corresponding to the depth value 532. This incorrect culling may result in missing pixels 410, 420.
[0046] Figure 6600 is a conceptual diagram illustrating an example per-sample biasing technique for sampling an object 510 into a low-resolution screen space. The per-sample biasing technique may assign the depth value of the farthest sample corresponding to pixel 522 and up to eight neighboring pixels to depth value 622. In this cross-sectional view, only two neighboring pixels are illustrated. For example, depth value 632 may be set to the maximum depth value of the samples at pixels 520, 522, and 524, which in this example is depth value 630 at pixel 520. Therefore, by assigning the depth value at pixel 520 to depth value 632, the value stored for each pixel 520, 522, and 524 may be farther than the surface of object 510. Therefore, when per-sample biasing is used, none of the illustrated full-resolution pixels 540 will be culled.
[0047] Figure 7 7 is a conceptual diagram 700 showing a cross-sectional view of an object 710 sampled into a low-resolution screen space. The low-resolution screen space may be represented by pixels 720, 722, and 724. The full-resolution screen space may be represented by pixels 740. The object 710 may have a convex surface defined by a surface 712 and a surface 714. Therefore, when sampling depth values 730, 732, 734 corresponding to pixels 720, 722, 724, respectively, it is possible that for some full-resolution pixels 740, the surface of the object 710 is farther away than any depth value 730, 732, 734. Therefore, a per-sample biasing technique that obtains the farthest depth of a set of neighboring depths may not prevent some full-resolution pixels 740 from being incorrectly culled.
[0048] Figure 8 is a conceptual diagram illustrating an example per-sample biasing technique using phantom points. A phantom point may be a point corresponding to a surface that extends beyond the edge of the surface. For example, phantom point 810 may correspond to surface 712. Sampler 156 may determine a phantom point for each pixel 720, 724 adjacent to sampled pixel 722 using a simplified slope calculation based on the depth of sampled pixel 722 and pixel 724 opposite to phantom point 810. That is, since the two adjacent pixels 720, 724 are equidistant from sampled pixel 722, the depth of phantom point 810 may be the depth of depth value 732 minus the difference between depth value 734 at opposite pixel 724 and depth value 732. That is, Figure 8 As shown, the depth value P of the phantom point of pixel A A =B-(CB).
[0049] Fig. 9 7 is a conceptual diagram showing the use of an offset applied to a ghost point of the object 710. Figure 8As shown, ghost point 810 may correspond to surface 712. Depth value 932 for pixel 722 may be set to the furthest depth among the depth of pixel 722, the depth of eight neighboring pixels (e.g., pixels 720 and 724), and the depth of any ghost point (e.g., ghost point 810). Therefore, in this example, sample depth value 932 may be set to the depth of ghost point 810. In implementation, only ghost points corresponding to the sampled surface for the sampled pixel may be determined for the sampled pixel. For example, since pixel 722 does not correspond to surface 714, sampler 156 may not determine a ghost point corresponding to surface 714 for pixel 722. However, when determining sample depth value 930, sampler 156 may determine a ghost point for surface 714. The depth of object 710 for each pixel in full-resolution pixel 740 may be closer than depth value 932 based on ghost point 810, and therefore each pixel in pixel 740 will be drawn based on object 710.
[0050] Additional biasing techniques that may be used include a global bias that applies an offset to each depth sample. While a global bias reduces incorrect culling, a global bias may also reduce desired culling and associated processing savings. Another example biasing technique is biased rounding. The layered depth buffer 130 and metadata 132 may have limited precision. Therefore, when sampling depth values, the sampler 156 may need to round to discrete values to be stored in the layered depth buffer 130. Therefore, when sampling reduced resolution occluded geometry 155, the sampler 156 may always round to a farther depth value.
[0051] Fig.10 1 is a schematic diagram 1000 showing overpainting when drawing an object 210 without prefilling the hierarchical depth buffer 130. Darker shades indicate that a pixel is overpainted more times. As shown, the surface of the smaller rectangular prism is overpainted multiple times.
[0052] In contrast, Fig.11 1 is a schematic diagram 1100 showing overpainting when drawing an object 210 after prefilling a hierarchical depth buffer 130 using a low-resolution depth pre-process. In this example, the depth renderer 154 only draws four of the six iterations of the cube in the fractal object 210. As shown, overpainting occurs primarily on the surfaces of the cube that were not drawn in the depth pre-process. There is also some overpainting along the edges of the rectangular prisms, where the biasing technique conservatively samples adjacent pixels corresponding to farther objects along the edges of the closer objects. Therefore, some occluded pixels along the edges are drawn multiple times. However, overall, overpainting is greatly reduced using a low-resolution depth pre-process.
[0053] Reference now Fig.12 The example method 1200 provides a computer device 110 with a method for rendering a full-resolution image using a low-resolution depth pre-process. For example, the method 1200 may be performed by an application 150 that executes on a CPU 114 and uses a GPU 120 to perform graphics processing.
[0054] In block 1210, method 1200 may include drawing occlusion geometry at a reduced resolution lower than full resolution. For example, application 150 may execute depth renderer 154 to draw occlusion geometry 155 (e.g., reduced resolution occlusion geometry 300) at a reduced resolution lower than full resolution. Depth renderer 154 may draw occlusion geometry 155 on CPU 114 or GPU 120. The reduced resolution may be a portion of the full resolution. In one implementation, the reduced resolution may be one-eighth of the full resolution. For example, a 4k frame (3840x 2160 pixels) may use a reduced resolution of 270p (480*270). In this case, one pixel of occlusion geometry 155 may correspond to one tile of full resolution. Other resolutions may also be selected based on, for example, the available processing resources of CPU 114 or GPU 120.
[0055] At block 1212, block 1210 may include drawing only objects whose size is greater than a threshold size. For example, the depth drawer 154 may choose to draw only objects whose size is greater than a threshold size. For example, 5% of the screen area. In another example, the threshold size may be at least two pixels per triangle at a reduced resolution, which may result in at least two samples of an object so that the slope of the object may be determined.
[0056] At block 1220, method 1200 may include sampling depth values of pixels of occluding geometry. For example, sampler 156 may sample depth values of pixels of occluding geometry 155. In an implementation, the sample count may correspond to the structure of layered depth buffer 130. For example, if layered depth buffer 130 includes metadata 132 for 8x8 tiles, one sample per tile may be used. Thus, when the reduced resolution is one-eighth, each pixel may correspond to one tile sample. However, other groupings or different resolutions of layered depth buffer 130 may be used and sampled appropriately.
[0057] At block 1230, the method 1200 may include pre-filling the GPU depth data based on the sampled depth value. For example, in an implementation, the application 150 may execute the depth pre-process component 152 to pre-fill the GPU depth data 129. The pre-filled GPU depth data 129 may include a layered depth buffer 130 that may be combined with other depth metadata 132. For example, at block 1231, block 1230 may include setting a corresponding value of the layered depth buffer of the GPU depth data to the sampled depth value. For example, the depth pre-process component 152 may set the minimum and maximum depth values for the tile in the layered depth buffer 130 to the sampled depth value. In another implementation without the layered depth buffer 130 or without direct access to the layered depth buffer 130, the sampler 156 may sample the occluding geometry 155, and the depth pre-process component 152 may directly fill the full-resolution depth data 136. For example, at 1233, block 1230 may include copying the sampled depth value to each pixel in a set of corresponding pixels in the full-resolution depth data of the GPU depth data. For example, the depth pre-process component 152 may copy the sampled depth value to each pixel in a group of corresponding pixels in the full resolution depth data 136 of the GPU depth data 129. In the case where the reduced resolution is one eighth of the full resolution, the depth pre-process component 152 may copy the sampled value of the low resolution pixel to each pixel in the 8x8 group of corresponding full resolution pixels.
[0058] In block 1232, block 1230 may include biasing the sampled depth value toward depth values that are farther from the camera. For example, the depth pre-process component 152 or the sampler 156 may bias the sampled depth value toward a farther depth. For the first example biasing technique, at block 1234, biasing the sampled depth value may include setting the depth value of the layered depth buffer 130 for the pixel to the farthest depth value of the pixel and each pixel neighboring the pixel. For example, the depth pre-process component 152 or the sampler 156 may set the depth value (e.g., depth value 532) of the layered depth buffer 130 for the pixel (e.g., pixel 522) to the farthest depth value of pixel 522 and each pixel neighboring the pixel (e.g., pixels 520 and 522). For a non-edge pixel, there may be eight neighboring pixels.
[0059] For the second example biasing technique, at block 1236, biasing the sampled depth value may include determining a slope between the sampled depth value of the pixel and the sampled depth value of each neighboring pixel. For example, the depth pre-process component 152 or the sampler 156 may determine a slope between the sampled depth value 732 of the pixel 722 and the sampled depth value 734 of each neighboring pixel 724. The slope may be based on a difference in the sampled depth values and a uniform pixel size. At block 1237, biasing the sampled depth value may include determining a depth value along the slope at a pixel opposite to each neighboring pixel. For example, the depth pre-process component 152 or the sampler 156 may determine a depth value 930 along the slope at a pixel 720 opposite to each neighboring pixel 724 (e.g., at the phantom point 810). At block 1238, biasing the sampled depth value may include setting the depth value of the layered depth buffer metadata for the pixel to the furthest depth value among the sampled depth value of the pixel, the sampled depth value of each neighboring pixel, and each extrapolated depth value along the slope. For example, the depth pre-process component 152 or the sampler 156 may set the depth value of the layered depth buffer 130 for the pixel 722 to the furthest depth value among the sampled depth value 732 of the pixel, the sampled depth values 730, 734 of each neighboring pixel, and each extrapolated depth value 930 along the slope.
[0060] At block 1240, method 1200 may include culling the at least one tile or pixel from the full-resolution rendering process in response to the depth of the at least one tile or pixel being greater than the corresponding depth value in GPU depth data 129. In an implementation, for example, GPU 120 may cull the at least one tile or pixel from the full-resolution rendering process in response to the depth of the at least one tile or pixel being greater than the corresponding depth value in GPU depth data 129. In an implementation, GPU 120 may automatically perform culling in response to a request from application 150 or display controller 142 to perform full-resolution rendering.
[0061] At block 1250, method 1200 may include performing a full-resolution rendering process on the remaining tiles or pixels to generate an image at full resolution. For example, GPU 120 may perform a full-resolution rendering process on the remaining tiles or pixels (e.g., tiles or pixels that were not culled) using rendering pipeline 126. GPU 120 may display the image at full resolution on computer display 112.
[0062] Reference now Fig.13 , illustrates an example computer device 110 according to an implementation, and Figure 1Compared to it includes additional component details. In one example, the computer device 110 may include a processor 48 for performing processing functions associated with one or more components and functions described herein. The processor 48 may include one or more groups of processors or a multi-core processor. In addition, the processor 48 may be implemented as an integrated processing system and / or a distributed processing system. In an implementation, for example, the processor 48 may include a CPU 114 and / or a GPU 120. In an example, the computer device 110 may include a memory 50 for storing instructions executable by the processor 48 for performing the functions described herein. In an implementation, for example, the memory 50 may include a memory 116 and / or a memory 122.
[0063] In addition, the computer device 110 may include a communication component 52 that provides for establishing and maintaining communications with one or more parties utilizing the hardware, software, and services described herein. The communication component 52 may host communications between components on the computer device 110, as well as communications between the computer device 110 and external devices (such as devices located on a cross-communication network and / or devices connected serially or locally to the computer device 110). For example, the communication component 52 may include one or more buses, and may further include a transmission chain component and a reception chain component associated with a transmitter and a receiver, respectively, that are operable to interface with external devices.
[0064] Additionally, the computer device 110 may include a data repository 54, which may be any suitable combination of hardware and / or software that provides mass storage for information, databases, and programs in conjunction with the implementations described herein. For example, the data repository 54 may be a database for the operating system 140 ( Figure 1 ) and / or application 150( Figure 1 ) data repository.
[0065] The computer device 110 may also include a user interface component 56 that is operable to receive input from a user of the computer device 110 and further operable to generate output for presentation to the user. The user interface component 56 may include one or more input devices, including, but not limited to, a keyboard, a numeric keypad, a mouse, a touch screen display, a digitizer, navigation keys, function keys, a microphone, a voice recognition component, any other mechanism capable of receiving input from a user, or any combination thereof. In addition, the user interface component 56 may include one or more output devices, including, but not limited to, a display (e.g., display 112), a speaker, a tactile feedback mechanism, a printer, any other mechanism capable of presenting output to a user, or any combination thereof.
[0066] In implementation, the user interface component 56 may transmit and / or receive messages corresponding to the operation of the operating system 140 and / or the application 150. In addition, the processor 48 executes the operating system 140 and / or the application 150, and the memory 50 or the data repository 54 may store them.
[0067] As used in this application, the terms "component", "system", etc. are intended to include computer-related entities, such as but not limited to hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a component can be, but not limited to, a process, a processor, an object, an executable file, an execution thread, a program, and / or a computer running on a processor. For example, both an application running on a computer device and a computer device can be a component. One or more components can reside in a process and / or an execution thread, and a component can be localized on a computer and / or distributed between two or more computers. In addition, these components can be executed from various computer-readable media with various data structures stored thereon. Components can communicate through local and / or remote processes, such as according to a signal with one or more data packets, such as data from a component, the component interacts with another component in a local system, a distributed system, and / or interacts with other systems through signals across a network (such as the Internet).
[0068] Furthermore, the term "or" is intended to mean an inclusive "or" rather than an exclusive "or." That is, unless specified otherwise, or clear from the context, the phrase "X employs A or B" is intended to mean any of the natural inclusive permutations. That is, the phrase "X employs A or B" is satisfied by any of the following: X employs A; X employs B; or X employs both A and B. Furthermore, the articles "a" and "an" used in this application and the appended claims should generally be construed to mean "one or more" unless specified otherwise or clear from the context to be directed to a singular form.
[0069] Various implementations or features may have been presented in systems that may include a number of devices, components, modules, etc. It should be understood and appreciated that the various systems may include additional devices, components, modules, etc., and / or may not include all of the devices, components, modules, etc. discussed in conjunction with the figures. Combinations of these methods may also be used.
[0070] The actions of various illustrative logics, logic blocks, and methods described in conjunction with the embodiments disclosed herein may be implemented or performed using one of the following of dedicated programming: a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of the above designed to perform the functions described herein. A general-purpose processor may be a microprocessor, but alternatively, the processor may be any conventional processor, controller, microcontroller, or state machine. The processor may also be implemented as a combination of computer devices, for example, a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors combined with a DSP core, or any other such configuration. In addition, at least one processor may include one or more components operable to perform one or more steps and / or actions described above.
[0071] In addition, the steps and / or actions of the method or process described in conjunction with the implementation disclosed herein can be implemented directly in hardware, a software module executed by a processor, or a combination of the two. The software module can reside in a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium can be coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Alternatively, the storage medium can be an integrated part of the processor. In addition, in some implementations, the processor and the storage medium can reside in an ASIC. Additionally, the ASIC can reside in a user terminal. Alternatively, the processor and the storage medium can reside in a user terminal as discrete components. In addition, in some implementations, the steps and / or actions of the method or process can reside on a machine-readable medium and / or a computer-readable medium as one or any combination or set of codes and / or instructions, which can be incorporated into a computer program product.
[0072] In one or more implementations, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include both computer storage media and communication media, and communication media include any media that supports the transfer of computer programs from one place to another. Storage media may be any available media that can be accessed by a computer. By way of example and not limitation, such computer-readable media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage devices, magnetic disk storage devices or other magnetic storage devices, or any other medium that can be used to carry or store desired program codes in the form of instructions or data structures and can be accessed by a computer. Disks and optical disks as used herein include compact disks (CDs), laser optical disks, optical disks, digital versatile disks (DVDs), floppy disks, and blue-ray disks, wherein disks typically reproduce data magnetically, and optical disks typically use lasers to reproduce data optically. The above combinations should also be included within the scope of computer-readable media.
[0073] Although the implementation of the present disclosure has been described in conjunction with the examples of the present disclosure, it will be appreciated by those skilled in the art that variations and modifications may be made to the above implementations without departing from the scope of the present disclosure. Other implementations will be apparent to those skilled in the art from consideration of the specification or from practice of the examples disclosed herein.
Claims
1. A method for rendering an image at full resolution, comprising: rendering occlusion geometry for the image at a reduced resolution less than the full resolution, wherein rendering the occlusion geometry comprises rendering only objects having a size greater than a threshold size; Sampling the depth values of the pixels of the occluding geometry; Pre-populating a graphics processing unit (GPU) depth data based on a plurality of sampled depth values; responsive to at least one tile or pixel having a depth further than a corresponding depth value in the GPU depth data, culling the at least one tile or pixel from a full resolution rendering process; performing the full resolution rendering process on the remaining tiles or pixels to generate the image at the full resolution, wherein objects excluded from rendering the occluding geometry are included in performing the full resolution rendering process; and The image is displayed at the full resolution on a computer display.
2. The method of claim 1 , wherein pre-filling the GPU depth data based on the depth values of the plurality of samples comprises: Depth values of the plurality of samples are biased toward depths that are farther than the depth values of the plurality of samples.
3. The method of claim 2, wherein biasing the depth values of the plurality of samples comprises: The depth value for a sampled pixel is set to the farthest depth value of the sampled pixel and each pixel neighboring the sampled pixel.
4. The method of claim 2, wherein biasing the depth values of the plurality of samples comprises: determining a corresponding slope between a sampled depth value of a center pixel and a sampled depth value of each neighboring pixel; determining a depth value along the corresponding slope at a pixel opposite each adjacent pixel; as well as The depth value for the center pixel is set to the furthest depth value of the sampled depth value of the center pixel, the sampled depth value of each neighboring pixel, and the determined depth values along each corresponding slope.
5. The method of claim 2, wherein biasing the depth values of the plurality of samples comprises: The sampled depth value is rounded to a discrete value of a layered depth buffer of the GPU depth data that is further than the sampled depth value.
6. The method of claim 1 , wherein pre-populating the GPU depth data based on the plurality of sampled depth values comprises: Setting corresponding values of tiles of a layered depth buffer for the GPU depth data to depth values of the plurality of samples.
7. The method of claim 1 , wherein pre-populating the GPU depth data based on the plurality of sampled depth values comprises: The sampled depth value is copied to each pixel in a set of corresponding pixels in the full resolution depth data of the GPU depth data.
8. The method of claim 1, wherein the threshold size is at least two pixels at the reduced resolution.
9. The method of claim 1, wherein the reduced resolution is at or below one eighth of the full resolution.
10. A computing device for rendering an image at full resolution, comprising: a memory storing one or more parameters or instructions for executing an operating system and one or more applications; a graphics processing unit, GPU, for drawing frames of the one or more applications for display on a display device coupled to the computing device, the GPU comprising GPU depth data; as well as at least one processor coupled to the memory and the GPU, wherein the at least one processor is configured to: rendering the occluding geometry at a reduced resolution less than the full resolution; Sampling the depth values of the pixels of the occluding geometry; determining a corresponding slope between a sampled depth value of a center pixel and a sampled depth value of each neighboring pixel; determining a depth value along the corresponding slope at a pixel opposite each adjacent pixel; as well as setting a depth value of the GPU depth data corresponding to the center pixel to the furthest depth value among the sampled depth value of the center pixel, the sampled depth value of each neighboring pixel, and the determined depth values along each corresponding slope; as well as pre-filling the GPU depth data based on a plurality of sampled depth values, wherein the processor is configured to bias the plurality of sampled depth values toward a depth further than the plurality of sampled depth values for pre-filling the GPU depth data; wherein the GPU is configured to: responsive to at least one tile or pixel having a depth further than a corresponding depth value in the GPU depth data, culling the at least one tile or pixel from a full resolution rendering process; as well as The full resolution rendering process is performed on the remaining tiles or pixels to generate the image at the full resolution.
11. The computing device of claim 10, wherein the processor is configured to set a depth value of the GPU depth data corresponding to a sampled pixel to a farthest depth value of the sampled pixel and each pixel adjacent to the sampled pixel.
12. The computing device of claim 10, wherein the processor is configured to add an offset to the depth value of each sample.
13. The computing device of claim 10 , wherein the GPU depth data comprises layered depth buffer metadata for a tile, and the at least one processor is configured to set corresponding minimum and maximum depth values to depth values of the plurality of samples for the tile of the layered depth buffer metadata.
14. A non-transitory computer readable medium comprising code executable by one or more processors for rendering an image at full resolution, the code comprising code for: rendering the occlusion geometry at a reduced resolution less than the full resolution, wherein rendering the occlusion geometry comprises rendering only objects having a size greater than a threshold size; Sampling the depth values of the pixels of the occluding geometry; biasing depth values of a plurality of samples toward depths further than the depth values of the plurality of samples; Prefilling a layered depth buffer based on a biased depth value; In response to at least one tile or pixel having a depth further than a corresponding depth value in the layered depth buffer, culling the at least one tile or pixel from a full resolution rendering process; as well as The full resolution rendering process is performed on the remaining tiles or pixels to generate the image at the full resolution, wherein objects that were excluded from rendering the occluding geometry are included in performing the full resolution rendering process.
15. The non-transitory computer-readable medium of claim 14, wherein biasing the depth values of the plurality of samples comprises: The depth value of the hierarchical depth buffer for a pixel is set to the farthest depth value of the pixel and each pixel neighboring the pixel.
16. The non-transitory computer-readable medium of claim 14, wherein biasing the depth values of the plurality of samples comprises: determining a corresponding slope between a sampled depth value of a center pixel and a sampled depth value of each neighboring pixel; determining a depth value along the corresponding slope at a pixel opposite each adjacent pixel; as well as The depth value of the layered depth buffer for the center pixel is set to the furthest depth value of the sample of the center pixel, the sampled depth value of each neighboring pixel, and the determined depth value along each corresponding slope.
Citation Information
Patent Citations
Geometric shadow map method for triangle reconstruction
CN104966313A
Apparatus and method for processing graphics primitives
US20140375637A1