Method and apparatus for edge compression anti-aliasing
Patent Information
- Application Number
- CN202180018945.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-03-11
- Filing Date
- 2021-02-09
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2041-02-09
Smart Images

Figure CN115244580B_ABST
Abstract
Description
[0001] Priority is claimed under 35 USC § 119
[0002] This application claims priority and benefit to U.S. non-provisional application No. 16 / 816,150, filed on March 11, 2020, which is expressly incorporated herein by reference. Technical Field
[0003] In summary, this disclosure relates to processing systems, and more specifically, to one or more techniques for graphics processing. Background Technology
[0004] Computing devices typically utilize graphics processing units (GPUs) to accelerate the rendering of graphics data for display. Such devices can include, for example, computer workstations, mobile phones (such as so-called smartphones), embedded systems, personal computers, tablet computers, and video game consoles. A GPU executes a graphics processing pipeline, which includes one or more processing stages that work together to execute graphics processing commands and output frames. A central processing unit (CPU) controls the operation of the GPU by issuing one or more graphics processing commands to it. Modern CPUs are typically capable of executing multiple applications concurrently, each of which may require the GPU to utilize its resources during execution. Devices that provide content for visual presentation on a display typically include GPUs.
[0005] Typically, a device's GPU is configured to execute processes within a graphics processing pipeline. However, with the advent of wireless communication and smaller handheld devices, there has been an increasing demand for improved graphics processing. Summary of the Invention
[0006] The following provides a brief overview of one or more aspects to offer a basic understanding of such aspects. This overview is not a comprehensive summary of all anticipated aspects, nor is it intended to identify key elements of all aspects, nor to depict the scope of any or all aspects. Its sole purpose is to present some concepts of one or more aspects in a simplified form as a prelude to the more detailed descriptions that follow.
[0007] In one aspect of this disclosure, methods, computer-readable media, and apparatus are provided. The apparatus may be a central processing unit (CPU), a graphics processing unit (GPU), or any apparatus capable of performing graphics processing. The apparatus may calculate a center-edge distance of a first pixel among a plurality of pixels, the center-edge distance of the first pixel being equal to the distance from the center of the first pixel to one or more edges of a first primitive among a plurality of primitives in a scene, wherein at least a portion of the first primitive may overlap with the center of the first pixel. The apparatus may also determine whether the first primitive is visible in the scene. The apparatus may also determine whether a portion of the first pixel overlaps with at least one auxiliary primitive among a plurality of primitives. Additionally, when a portion of the first pixel overlaps with at least one auxiliary primitive, the apparatus may calculate the distance from the center of the first pixel to one or more edges of the at least one auxiliary primitive. When the first primitive is visible in the scene, the apparatus may also store the center-edge distance of the first pixel. Furthermore, when a portion of the first pixel overlaps with at least one auxiliary primitive, the apparatus may store the distance from the center of the first pixel to one or more edges of the at least one auxiliary primitive in an auxiliary buffer. The apparatus may also determine whether the depth of the first primitive is less than or greater than the depth of a second primitive. The apparatus can also determine the amount of overlap between the first pixel and the first primitive. Furthermore, when at least one auxiliary primitive forms a mesh with the first primitive, the apparatus can update the amount of overlap between the first pixel and the first primitive. The apparatus can also mix the color of the first pixel with the color of the second pixel based on at least one of the center-edge distance of the first pixel or the amount of overlap between the first pixel and the first primitive.
[0008] Details of one or more examples of this disclosure are set forth in the accompanying drawings and the description below. Other features, objects, and advantages of this disclosure will become apparent from the specification, drawings, and claims. Attached Figure Description
[0009] Figure 1 This is a block diagram illustrating an example content generation system based on one or more techniques according to this disclosure.
[0010] Figure 2 Example GPUs are shown that employ one or more technologies according to this disclosure.
[0011] Figure 3 Example images or surfaces illustrating one or more techniques according to this disclosure are shown.
[0012] Figure 4 Example images or surfaces illustrating one or more techniques according to this disclosure are shown.
[0013] Figure 5Example scenarios including pixels and primitives are shown, illustrating one or more techniques according to this disclosure.
[0014] Figure 6 Example diagrams illustrating one or more techniques according to this disclosure, including anti-aliasing methods.
[0015] Figure 7 Example diagrams illustrating axial distance calculations according to one or more techniques based on this disclosure are shown.
[0016] Figure 8 Example scenarios including pixels and primitives are shown, illustrating one or more techniques according to this disclosure.
[0017] Figure 9 Example scenarios including pixels and primitives are shown, illustrating one or more techniques according to this disclosure.
[0018] Figure 10 Example diagrams illustrating one or more techniques according to this disclosure, including anti-aliasing methods.
[0019] Figure 11 An example flowchart illustrating an example method of one or more techniques according to this disclosure is shown. Detailed Implementation
[0020] Various anti-aliasing methods can be used to address pixel display problems, such as coarse or jagged edges, by attempting to produce smoother pixels or images. However, some anti-aliasing methods may have increased execution overhead. Furthermore, some anti-aliasing methods may have a large memory footprint due to the large amount of data stored. Additionally, some anti-aliasing methods may not support deferred shading, which is becoming increasingly common in game engines used for complex lighting scenes. Aspects of this disclosure can utilize anti-aliasing methods that reduce execution overhead and / or the amount of data to be stored. For example, aspects of this disclosure can use anti-aliasing methods to smooth the edges of displayed pixels while reducing execution overhead and / or the amount of data to be stored. Aspects of this disclosure can propose novel methods in which GPU hardware calculates pixel-to-edge distances for each primitive based on primitive geometry information, which can also process sub-pixel primitives, such as primitives that do not cover the center of the pixel but can contribute to the final average color of the pixel. Aspects of this disclosure can also allow users to customize blended pixel colors based on edge distances. The techniques described herein can also remove the limitations of deferred shading by preserving the pixel-to-edge distance for each geometric edge in the geometry. This disclosure may also include lower storage requirements and / or reduced execution overhead due to rendering compared to other anti-aliasing methods, while maintaining high quality.
[0021] The following description, with reference to the accompanying drawings, provides a more complete picture of various aspects of the systems, apparatuses, computer program products, and methods. However, this disclosure may be embodied in many different forms and should not be construed as limited to any particular structure or function presented throughout this disclosure. Rather, these aspects are provided so that this disclosure will be comprehensive and complete, and will fully convey the scope of this disclosure to those skilled in the art. Based on the teachings herein, those skilled in the art will understand that the scope of this disclosure is intended to cover any aspect of the systems, apparatuses, computer program products, and methods disclosed herein, whether that aspect is implemented independently of or in combination with other aspects of this disclosure. For example, an apparatus may be implemented or a method may be practiced using any number of the aspects set forth herein. Furthermore, the scope of this disclosure is intended to cover such apparatuses or methods practiced using structures, functions, or structures and functions other than or different from the aspects of the disclosure set forth herein. Any aspect disclosed herein may be embodied by one or more elements of the claims.
[0022] While various aspects are described herein, numerous variations and substitutions of these aspects fall within the scope of this disclosure. Although some potential benefits and advantages of the aspects of this disclosure are mentioned, the scope of this disclosure is not intended to be limited to a particular benefit, use, or objective. Rather, the aspects of this disclosure are intended to be broadly applicable to different wireless technologies, system configurations, networks, and transport protocols, some of which are illustrated by way of example in the accompanying drawings and the description below. The detailed description and drawings are merely illustrative and not limiting of this disclosure, and the scope of this disclosure is defined by the appended claims and their equivalents.
[0023] Several aspects are given with reference to various apparatuses and methods. These apparatuses and methods are described in the specific embodiments below and illustrated in the accompanying drawings by various blocks, components, circuits, processes, algorithms, etc. (collectively referred to as "elements"). These elements can be implemented using electronic hardware, computer software, or any combination thereof. Whether such elements are implemented as hardware or software depends on the specific application and the design constraints imposed on the overall system.
[0024] For example, an element, or any part of an element, or any combination of elements, can be implemented as a "processing system," which includes one or more processors (which may also be referred to as processing units). Examples of processors include: microprocessors, microcontrollers, graphics processing units (GPUs), general-purpose GPUs (GPGPUs), central processing units (CPUs), application processors, digital signal processors (DSPs), reduced instruction set computing (RISC) processors, system-on-a-chip (SoCs), baseband processors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), programmable logic devices (PLDs), state machines, gated logic, discrete hardware circuits, and other suitable hardware configured to perform the various functions described throughout this disclosure. One or more processors in a processing system can execute software. Whether referred to as software, firmware, middleware, microcode, hardware description languages, or others, software can be broadly interpreted as meaning instructions, instruction sets, code, code segments, program code, programs, subroutines, software components, applications, software applications, software packages, routines, subroutines, objects, executable files, threads of execution, procedures, functions, etc. The term can be used to refer to software. As described herein, one or more techniques may involve applications, i.e., software, configured to perform one or more functions. In such examples, the application may be stored on memory, such as on-chip memory of a processor, system memory, or any other memory. The hardware described herein (such as a processor) may be configured to execute the application. For example, an application may be described as including code that, when executed by the hardware, causes the hardware to perform one or more techniques described herein. For example, the hardware may access the code from memory and execute the code accessed from memory to perform one or more techniques described herein. In some examples, components are identified in this disclosure. In such examples, a component may be hardware, software, or a combination thereof. A component may be a single component or a subcomponent of a single component.
[0025] Accordingly, in one or more examples described herein, the described functionality can be implemented in hardware, software, or any combination thereof. If implemented in software, the functionality can be stored or encoded as one or more instructions or code on a computer-readable medium. Computer-readable media includes computer storage media. Storage media can be any available medium accessible by a computer. By way of example, and not limitation, such computer-readable media can include random access memory (RAM), read-only memory (ROM), electrically erasable programmable ROM (EEPROM), optical disk storage, magnetic disk storage, other magnetic storage devices, combinations of computer-readable media of the types described above, or any other medium that can be used to store computer-executable code in the form of instructions or data structures accessible by a computer.
[0026] This disclosure describes techniques for having a graphics processing pipeline in a single device or multiple devices, thereby improving the rendering of graphics content and / or reducing the load on processing units (i.e., any processing unit configured to perform one or more of the techniques described herein, such as a GPU). For example, this disclosure describes techniques for performing graphics processing in any device that utilizes graphics processing. Other example benefits are described throughout this disclosure.
[0027] As used herein, instances of the term "content" can refer to "graphic content," "image," or vice versa. This is true regardless of whether the term is used as an adjective, noun, or other part of speech. In some examples, as used herein, the term "graphic content" can refer to content produced by one or more processes in a graphics processing pipeline. In some examples, as used herein, the term "graphic content" can refer to content produced by a processing unit configured to perform graphics processing. In some examples, as used herein, the term "graphic content" can refer to content produced by a graphics processing unit.
[0028] In some examples, as used herein, the term "display content" may refer to content generated by a processing unit configured to perform display processing. Graphical content can be processed to become display content. For example, a graphics processing unit may output graphical content, such as frames, to a buffer (which may be referred to as a frame buffer). The display processing unit may read graphical content (such as one or more frames) from the buffer and perform one or more display processing techniques on it to generate display content. For example, the display processing unit may be configured to perform compositing on one or more rendering layers to generate frames. As another example, the display processing unit may be configured to composite, blend, or otherwise combine two or more layers into a single frame. The display processing unit may be configured to perform scaling (e.g., zooming in or out) on frames. In some examples, a frame may refer to a layer. In other examples, a frame may refer to two or more layers that have been blended together to form a frame, i.e., a frame comprises two or more layers, and frames comprising two or more layers may subsequently be blended.
[0029] Figure 1This is a block diagram illustrating an example content generation system 100 configured to implement one or more technologies of this disclosure. The content generation system 100 includes a device 104. Device 104 may include one or more components or circuitry for performing the various functions described herein. In some examples, one or more components of device 104 may be components of a System-on-a-Chip (SOC). Device 104 may include one or more components configured to perform one or more technologies of this disclosure. In the illustrated example, device 104 may include a processing unit 120, a content encoder / decoder 122, and a system memory 124. In some aspects, device 104 may include multiple optional components, such as a communication interface 126, a transceiver 132, a receiver 128, a transmitter 130, a display processor 127, and one or more displays 131. Reference to display 131 may refer to one or more displays 131. For example, display 131 may include a single display or multiple displays. Display 131 may include a first display and a second display. The first display may be a left-eye display, and the second display may be a right-eye display. In some examples, the first and second displays may receive different frames for rendering on them. In other examples, the first and second displays may receive the same frames for rendering on them. In further examples, the results of graphics processing may not be displayed on the devices; for example, the first and second displays may not receive any frames for rendering on them. Alternatively, frames or graphics processing results may be transmitted to another device. In some aspects, this may be referred to as segmented rendering.
[0030] Processing unit 120 may include internal memory 121. Processing unit 120 may be configured to perform graphics processing, such as in a graphics processing pipeline 107. Content encoder / decoder 122 may include internal memory 123. In some examples, device 104 may include a display processor (e.g., display processor 127) to perform one or more display processing techniques on one or more frames generated by processing unit 120 before being rendered by one or more displays 131. Display processor 127 may be configured to perform display processing. For example, display processor 127 may be configured to perform one or more display processing techniques on one or more frames generated by processing unit 120. One or more displays 131 may be configured to display or otherwise render the frames processed by display processor 127. In some examples, one or more displays 131 may include one or more of the following: liquid crystal display (LCD), plasma display, organic light-emitting diode (OLED) display, projection display device, augmented reality display device, virtual reality display device, head-mounted display, or any other type of display device.
[0031] Memory external to processing unit 120 and content encoder / decoder 122 (such as system memory 124) may be accessible to processing unit 120 and content encoder / decoder 122. For example, processing unit 120 and content encoder / decoder 122 may be configured to read from and / or write to external memory (such as system memory 124). Processing unit 120 and content encoder / decoder 122 may be communicatively coupled to system memory 124 via a bus. In some examples, processing unit 120 and content encoder / decoder 122 may be communicatively coupled to each other via a bus or different connections.
[0032] Content encoder / decoder 122 can be configured to receive graphic content from any source, such as system memory 124 and / or communication interface 126. System memory 124 can be configured to store the received encoded or decoded graphic content. Content encoder / decoder 122 can be configured to receive, for example, encoded or decoded graphic content in the form of encoded pixel data from system memory 124 and / or communication interface 126. Content encoder / decoder 122 can be configured to encode or decode any graphic content.
[0033] Internal memory 121 or system memory 124 may include one or more volatile or non-volatile memories or storage devices. In some examples, internal memory 121 or system memory 124 may include RAM, SRAM, DRAM, erasable programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), flash memory, magnetic data media or optical storage media, or any other type of memory.
[0034] According to some examples, internal memory 121 or system memory 124 may be a non-transitory storage medium. The term "non-transitory" may indicate that the storage medium is not embodied in a carrier wave or a propagating signal. However, the term "non-transitory" should not be construed as meaning that internal memory 121 or system memory 124 is immovable or that its contents are static. As one example, system memory 124 may be removed from device 104 and moved to another device. As another example, system memory 124 may be non-removable from device 104.
[0035] Processing unit 120 may be a central processing unit (CPU), a graphics processing unit (GPU), a general-purpose GPU (GPGPU), or any other processing unit that can be configured to perform graphics processing. In some examples, processing unit 120 may be integrated into the motherboard of device 104. In some examples, processing unit 120 may reside on a graphics card mounted in a port on the motherboard of device 104, or may otherwise be incorporated into a peripheral device configured to interoperate with device 104. Processing unit 120 may include one or more processors, such as one or more microprocessors, GPUs, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), arithmetic logic units (ALUs), digital signal processors (DSPs), discrete logic, software, hardware, firmware, other equivalent integrated or discrete logic circuits, or any combination thereof. If the technology is partially implemented in software, processing unit 120 may store instructions for software in a suitable non-transitory computer-readable storage medium (e.g., internal memory 121) and may use one or more processors to execute instructions in hardware to perform the technology of this disclosure. Any of the foregoing, including hardware, software, and combinations of hardware and software, can be considered as one or more processors.
[0036] The content encoder / decoder 122 can be any processing unit configured to perform content decoding. In some examples, the content encoder / decoder 122 can be incorporated into the motherboard of device 104. The content encoder / decoder 122 may include one or more processors, such as one or more microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), arithmetic logic units (ALUs), digital signal processors (DSPs), video processors, discrete logic, software, hardware, firmware, other equivalent integrated or discrete logic circuits, or any combination thereof. If the technology is implemented in part in software, the content encoder / decoder 122 may store instructions for software in a suitable non-transitory computer-readable storage medium (e.g., internal memory 121), and may use one or more processors to execute instructions in hardware to perform the technology of this disclosure. Any of the foregoing, including hardware, software, combinations of hardware and software, etc., can be considered as one or more processors.
[0037] In some aspects, the content generation system 100 may include an optional communication interface 126. Communication interface 126 may include a receiver 128 and a transmitter 130. Receiver 128 may be configured to perform any of the receiving functions described herein with respect to device 104. Additionally, receiver 128 may be configured to receive information (e.g., eye or head position information, rendering commands, or location information) from another device. Transmitter 130 may be configured to perform any of the transmitting functions described herein with respect to device 104. For example, transmitter 130 may be configured to send information to another device that may include a request for content. Receiver 128 and transmitter 130 may be combined into transceiver 132. In such an example, transceiver 132 may be configured to perform any of the receiving and / or transmitting functions described herein with respect to device 104.
[0038] Refer again Figure 1 In some aspects, the graphics processing pipeline 107 may include a determination component 198 configured to: calculate a center-edge distance of a first pixel among a plurality of pixels, the center-edge distance of the first pixel being equal to the distance from the center of the first pixel to one or more edges of the first primitive among a plurality of primitives in the scene, wherein at least a portion of the first primitive may overlap with the center of the first pixel. The determination component 198 may also be configured to: determine whether the first primitive is visible in the scene. The determination component 198 may also be configured to: determine whether a portion of the first pixel overlaps with at least one auxiliary primitive among a plurality of primitives. The determination component 198 may also be configured to: calculate the distance from the center of the first pixel to one or more edges of the at least one auxiliary primitive when a portion of the first pixel overlaps with the at least one auxiliary primitive. The determination component 198 may also be configured to: store the center-edge distance of the first pixel when the first primitive is visible in the scene. The determination component 198 may also be configured to: store the distance from the center of the first pixel to one or more edges of the at least one auxiliary primitive in an auxiliary buffer when a portion of the first pixel overlaps with the at least one auxiliary primitive. The determining component 198 can also be configured to: determine whether the depth of the first primitive is less than or greater than the depth of the second primitive. The determining component 198 can also be configured to: determine the amount of overlap between the first pixel and the first primitive. The determining component 198 can also be configured to: update the amount of overlap between the first pixel and the first primitive when at least one auxiliary primitive forms a mesh with the first primitive. The determining component 198 can also be configured to: mix the color of the first pixel with the color of the second pixel based on at least one of the center-edge distance of the first pixel or the amount of overlap between the first pixel and the first primitive.
[0039] As described herein, a device such as device 104 can refer to any device, apparatus, or system configured to perform one or more of the techniques described herein. For example, a device can be a server, base station, user equipment, client device, station, access point, computer (e.g., personal computer, desktop computer, laptop computer, tablet computer, computer workstation, or mainframe computer), end product, apparatus, telephone, smartphone, server, video game platform or console, handheld device (e.g., portable video game device or personal digital assistant (PDA)), wearable computing device (e.g., smartwatch, augmented reality device, or virtual reality device), non-wearable device, display or display device, television, set-top box, intermediate network device, digital media player, video streaming device, content streaming device, in-vehicle computer, any mobile device, any device configured to generate graphical content, or any device configured to perform one or more of the techniques described herein. The processes described herein may be described as being performed by a specific component (e.g., GPU), but in further embodiments, they may be performed using other components (e.g., CPU) consistent with the disclosed embodiments.
[0040] GPUs can process various types of data or data packets within the GPU pipeline. For example, in some aspects, a GPU can process two types of data or data packets, such as context register packets and draw call data. Context register packets can be a collection of global state information that manages how the graphics context will be processed, such as information about global registers, shaders, or constant data. For example, a context register packet may include information about the color format. In some aspects of context register packets, there may be bits indicating which workload belongs to the context register. Furthermore, there may be multiple functions or programs running simultaneously and / or in parallel. For example, a function or program may describe a specific operation, such as a color mode or color format. Therefore, context registers can define multiple states of the GPU.
[0041] Context states can be used to determine how individual processing units (e.g., vertex extractors (VFDs), vertex shaders (VSs), shader processors, or geometry processors) operate, and / or in what modes they operate. For this purpose, the GPU can use context registers and programming data. In some aspects, the GPU can generate workloads in the pipeline, such as vertex or pixel workloads, based on the context register definitions of modes or states. Certain processing units (e.g., VFDs) can use these states to determine certain functions, such as how to assemble vertices. Because these modes or states can change, the GPU may need to modify the corresponding context. Furthermore, the workload corresponding to a mode or state can follow the changing mode or state.
[0042] Figure 2 An example GPU 200 is shown, illustrating one or more technologies according to this disclosure. (e.g.) Figure 2 As shown, GPU 200 includes a command processor (CP) 210, a draw call group 212, a VFD 220, a VS 222, a vertex cache (VPC) 224, a triangle setup engine (TSE) 226, a rasterizer (RAS) 228, a Z-process engine (ZPE) 230, a pixel interpolator (PI) 232, a fragment shader (FS) 234, a rendering backend (RB) 236, an L2 cache (UCHE) 238, and system memory 240. Although Figure 2 The GPU 200 is shown to include processing units 220-238, but the GPU 200 may include multiple additional processing units. Furthermore, processing units 220-238 are merely examples, and any combination or order of processing units may be used by the GPU according to this disclosure. The GPU 200 also includes a command buffer 250, a context register group 260, and a context state 261.
[0043] like Figure 2 As shown, the GPU can utilize a CP (e.g., CP 210) or a hardware accelerator to resolve the command buffer into context register packets (e.g., context register packet 260) and / or draw call data packets (e.g., draw call packet 212). CP 210 can then send the context register packet 260 or the draw call data packet 212 to a processing unit or block within the GPU via a separate path. Furthermore, the command buffer 250 can alternate between different states of the context registers and draw calls. For example, the command buffer can be constructed as follows: context register of context N, draw call of context N, context register of context N+1, and draw call of context N+1.
[0044] GPUs can render images in a variety of different ways. In some instances, GPUs can use either grid rendering or tile rendering to render images. In tile rendering GPUs, an image can be divided or split into different parts or tiles. After the image is divided, each part or tile can be rendered individually. Tile rendering GPUs can divide computer graphics images into a grid format, allowing each part of the grid (i.e., a tile) to be rendered individually. In some aspects, an image can be divided into different bins or tiles in a binning pass. In some aspects, a visibility stream can be constructed during the binning pass, where visible primitives or draw calls can be identified.
[0045] In some aspects, the GPU can apply the drawing or rendering process to different partitions or tiles. For example, the GPU can render against a partition and perform all drawing on the primitives or pixels within that partition. During the process of rendering against a partition, the rendering target can be located in the GMEM. In some instances, after rendering against a partition, the contents of the rendering target can be moved to system memory, and the GMEM can be released to render the next partition. Furthermore, the GPU can render against another partition and perform drawing on the primitives or pixels within that partition. Therefore, in some aspects, there may be a small number of partitions (e.g., four partitions) that cover all drawing on a surface. Additionally, the GPU can loop through all drawing in a partition, but perform drawing only on visible drawing calls (i.e., drawing calls that include visible geometry). In some aspects, such as in a partition pass, a visibility stream can be generated to determine the visibility information of each primitive in the image or scene. For example, the visibility stream can identify whether a primitive is visible. In some aspects, this information can be used, for example, to remove invisible primitives in the rendering pass. Furthermore, at least some of the primitives identified as visible can be rendered in the rendering pass.
[0046] In some aspects of tile-based rendering, multiple processing stages or passes can exist. For example, rendering can be performed in two passes, such as a visibility or partition visibility pass and a rendering or partition rendering pass. During the visibility pass, the GPU can input a rendering workload, record the positions of primitives or triangles, and then determine which primitives or triangles fall into which partition or region. In some aspects of the visibility pass, the GPU can also identify or mark the visibility of each primitive or triangle in the visibility stream. During the rendering pass, the GPU can input a visibility stream and process one partition or region at a time. In some aspects, the visibility stream can be analyzed to determine which primitives or primitive vertices are visible or invisible. Therefore, visible primitives or primitive vertices can be processed. By doing so, the GPU can reduce the unnecessary workload of processing or rendering invisible primitives or triangles.
[0047] In some aspects, certain types of primitive geometry, such as position-only geometry, can be processed during the visibility path. Furthermore, primitives can be classified into different partitions or regions based on their position or location. In some instances, classifying primitives or triangles into different partitions can be performed by determining visibility information for those primitives or triangles. For example, the GPU can determine the visibility information for each primitive in each partition or region or write it to, for example, system memory. This visibility information can be used to determine or generate a visibility stream. In the rendering path, the primitives in each partition can be rendered separately. In these instances, the visibility stream can be retrieved from memory used to discard primitives that are not visible to that partition.
[0048] GPUs or GPU architectures can offer a variety of different options for rendering, such as software rendering and hardware rendering. In software rendering, the driver or CPU can copy the entire frame geometry by processing each view at a time. Furthermore, several different states can change depending on the view. Therefore, in software rendering, the software can copy the entire workload by changing some states that can be used for rendering for each viewpoint in the image. In some aspects, there can be increased overhead because the GPU may submit the same workload multiple times for each viewpoint in the image. In hardware rendering, the hardware or GPU can be responsible for copying or processing the geometry for each viewpoint in the image. Therefore, the hardware can manage the copying or processing of primitives or triangles for each viewpoint in the image.
[0049] Figure 3 An image or surface 300 is shown, which includes multiple primitives divided into multiple partitions. For example... Figure 3 As shown, the image or surface 300 includes region 302, which includes primitives 321, 322, 323, and 324. Primitives 321, 322, 323, and 324 are divided or placed into different partitions, such as partitions 310, 311, 312, 313, 314, and 315. Figure 3 An example of tile-based rendering using multiple viewpoints is shown for primitives 321-324. For example, primitives 321-324 are located in a first viewpoint 350 and a second viewpoint 351. Therefore, a GPU that processes or renders an image or surface 300 including region 302 can utilize multiple viewpoints or multi-view rendering.
[0050] As indicated in this article, GPUs or graphics processing units can use tile-based rendering architectures to reduce power consumption or save memory bandwidth. As further stated above, this rendering method divides the scene into multiple partitions, along with visibility paths that include identifying visible triangles within each partition. Therefore, in tile-based rendering, the entire screen can be divided into multiple partitions or tiles. The scene can then be rendered multiple times, for example, once or multiple times for each partition.
[0051] In various aspects of graphics rendering, some graphics applications may render a single target (i.e., the rendering target) once or multiple times. For example, in graphics rendering, a frame buffer on system memory can be updated multiple times. A frame buffer can be part of memory or random access memory (RAM) (e.g., containing bitmaps or storage) to help store display data for the GPU. A frame buffer can also be a memory buffer containing a complete frame of data. Furthermore, a frame buffer can be a logical buffer. In some aspects, updating the frame buffer can be performed in partitioned or tiled rendering, where, as discussed above, the surface is divided into multiple partitions or tiles, and each partition or tile can then be rendered individually. Furthermore, in tiled rendering, the frame buffer can be divided into multiple partitions or tiles.
[0052] As indicated in this article, in a partitioned or tiled rendering architecture, frame buffers may have data repeatedly stored or written to them, for example, when rendering from different types of memory. This can be referred to as resolving and de-resolving frame buffers or system memory. For example, when storing or writing to one frame buffer and then switching to another, data or information on the frame buffer can be resolved from GPU Internal Memory (GMEM) at the GPU to system memory, i.e., memory in Dual Data Rate (DDR) RAM or Dynamic RAM (DRAM).
[0053] In some aspects, system memory can also be system-on-chip (SoC) memory or another chip-based memory, such as on a device or smartphone, used for storing data or information. System memory can also be physical data storage shared by the CPU and / or GPU. In some aspects, system memory can be, for example, a DRAM chip on a device or smartphone. Therefore, SoC memory can be a chip-based method for storing data.
[0054] In some aspects, GMEM can be on-chip memory at the GPU, which can be implemented using static RAM (SRAM). Alternatively, GMEM can be stored on the device (e.g., a smartphone). As indicated herein, data or information can be transferred between system memory or DRAM and GMEM, for example, at the device. In some aspects, system memory or DRAM can reside at the CPU or GPU. Furthermore, data can be stored at DDR or DRAM. In partitioned or tiled rendering, a small portion of the memory can be stored at the GPU (e.g., at GMEM). In some instances, storing data at GMEM may incur a larger processing workload and / or power consumption compared to storing data at the frame buffer or system memory.
[0055] In some aspects, GPUs can perform tessellation or a tessellation process. During tessellation, larger primitives can be divided into smaller subprimes or tessellated primitives. Tessellation can divide an image into more detailed subprimes or tessellated primitives, which can lead to a more detailed rendering process and more detailed graphic content. A tessellation processor can determine or generate subprimes or tessellated primitives. In some aspects, one or more primitives can be grouped into patches. The tessellation processor can then determine or generate a geometry-based tessellation of the patches based on one or more tessellation parameters, such as using triangles or rectangles.
[0056] Compared to images or surfaces generated from primitive tiles that would otherwise be based on primitives, the tessellation process allows for the determination or generation of more detailed or smoother images or surfaces. Furthermore, tessellation can be used to implement or render more detailed surfaces in an image. As mentioned above, the tessellation process can produce subprimeware or tessellated primitives. These subprimeware or tessellated primitives are generated as output from tessellation, for example, based on one or more primitives or tiles. These primitives can also be referred to as primitive primitives or regular primitives, which are generated based on the original image or surface values. The determined or generated subprimeware or tessellated primitives can be more detailed versions of the primitive primitives or tiles. In some instances, each subprimeware in a subprimeware may be smaller than each of the primitives or tiles. Therefore, primitive primitives can be represented as subdivided into subprimeware or tessellated primitives.
[0057] Figure 4 Example images or surfaces 400 illustrating one or more techniques according to this disclosure are shown. Figure 4 Image 400 is shown to be divided into multiple partitions, such as partition 410, partition 420, partition 430, and partition 440. Furthermore, Figure 4A block 460 is shown, comprising one or more primitives 462. In some aspects, block 460 may be referred to as a set of primitives or one or more primitives. Figure 4 It also displays multiple sub-elements 470, including sub-elements 472, 474, and 476. For example... Figure 4 As shown, a single sub-sub ...
[0058] Figure 4 Examples illustrating the surface subdivision process described above are shown. For instance, the original or input primitives (e.g., one or more primitives 462 in tile 460) are displayed as larger triangles with points as vertices. Subprimes output from the surface subdivision process or subdivided primitives (e.g., subprime 470) are displayed as smaller rectangles or triangles on surface 400, such as subprimes 472, 474, and 476.
[0059] GPUs render polygons by sampling objects at discrete pixel locations, which can cause jagged edges on the objects. Anti-aliasing is a method of handling pixel display problems, such as coarse or jagged edges, by smoothing the display edges of pixels. For example, multi-sample anti-aliasing (MSAA) is one of many anti-aliasing techniques used to smooth pixel edges. This anti-aliasing technique relies on sampling the same pixel at multiple locations (e.g., 2, 4, 8, or 16 samples per pixel) and then determining the percentage of the pixel inside or outside the object. This information can later be used to blend pixel colors to smooth coarse pixel edges.
[0060] To use the aforementioned anti-aliasing techniques, each pixel may require up to four times more storage (e.g., in the case of MSAA-4x) and significantly more computational overhead (e.g., approximately 10% more overhead). This can lead to a decrease in overall benchmark performance (e.g., a 25%–30% decrease). Furthermore, this technique may limit the use of deferred lighting algorithms for rendering scenes with multiple light sources, as sampling level information may be lost when resolving the final frame buffer. Additionally, some game developers can offer edge-distance-based algorithms as an alternative to MSAA, but these may be software implementations that post-process pixels to detect edges, or they may not be able to handle sub-pixel primitives.
[0061] As mentioned above, several anti-aliasing methods can be used to address pixel display issues, such as rough or jagged edges, by attempting to produce smoother images. However, these anti-aliasing methods (e.g., MSAA) can have increased execution overhead. Furthermore, these methods can have a large memory footprint due to the large amount of data stored. Other use cases may specify even higher execution overhead. Additionally, other anti-aliasing methods may not support deferred shading, which can be used in game engines for complex lighting scenes. Therefore, there is currently a need for anti-aliasing techniques that can reduce execution overhead and / or the amount of data to be stored.
[0062] Various aspects of this disclosure can utilize anti-aliasing methods that reduce execution overhead and / or the amount of data to be stored. For example, various aspects of this disclosure can use anti-aliasing methods to smooth the display edges of pixels while reducing execution overhead and / or the amount of data to be stored. Various aspects of this disclosure can propose novel methods in which GPU hardware calculates the pixel-to-edge distance for each primitive based on primitive geometry information, which can also process sub-pixel primitives, i.e., primitives that do not cover the center of the pixel but can contribute to the final average color of the pixel. Various aspects of this disclosure can also allow users to customize the blending of pixel colors based on edge distances. The techniques in this document can also remove the constraints on deferred shading by preserving the pixel-to-edge distance for each edge in the geometry. This disclosure can also include lower storage requirements compared to other anti-aliasing methods (e.g., MSAA), and / or reduced execution overhead due to rendering while maintaining high quality.
[0063] As noted above, aspects of this disclosure may include an improved hardware-accelerated anti-aliasing solution based on pixel-to-edge distance, which allows users to customize the blending of pixel information to achieve smoother edges of objects (e.g., including edges of sub-pixel primitives). This approach can achieve quality approaching that of other anti-aliasing methods (e.g., MSAA) with significantly lower storage requirements and / or reduced execution overhead. Some aspects of this disclosure include Edge Compression Anti-aliasing (ECAA), a pixel-to-edge implementation of anti-aliasing. The ECAA algorithm according to this disclosure may also utilize auxEdge information (i.e., distance to the edge of a sub-pixel primitive) to implement pixel-to-edge anti-aliasing using sub-pixel primitive distances. Furthermore, the per-byte condition for the anti-aliasing algorithm used herein may be lower than that of other anti-aliasing methods (e.g., MSAA).
[0064] As indicated herein, this disclosure can provide low-overhead alternatives to other anti-aliasing schemes and / or achieve high image quality while maintaining low execution overhead. This disclosure may also include novel hardware-accelerated anti-aliasing solutions that allow users or applications to choose among multiple supported anti-aliasing schemes. After selecting an edge distance scheme, the driver can configure hardware to compute distance information during the rendering pass, which is stored along with other geometry buffer data. During the resolution operation, this disclosure can invoke a post-processing shader based on an algorithm for blending neighboring pixels to mitigate any jagged artifacts along the edges of the geometry.
[0065] Furthermore, the edge distance antialiasing solution of this disclosure may include several key innovations that differentiate it from and improve upon existing methods. Aspects of this disclosure may also include antialiasing of sub-pixel primitives. For example, this disclosure can provide a scheme where such primitives are processed by calculating auxiliary edge data from them, which can later be used to improve the blending factor to handle overlays from the sub-pixel primitives. Aspects of this disclosure may also utilize geometric information from the scene to generate both the center edge and the auxiliary edge distance.
[0066] Furthermore, this disclosure can handle all types of primitives, such as regular and subpixels, by using conservative rasterization and / or storing auxiliary edge information of subpixels from any part of the covered pixel (and not the center sample), as well as regular edges of primitives from the center of the covered pixel. Aspects of this disclosure may also include hardware acceleration techniques, where calculating edge distances in software can introduce additional rendering paths to render the full geometry and / or calculate the edge distances before they are consumed by post-processing paths. For example, this disclosure can calculate edge distance information during the rendering path with minimal hardware overhead and provide the edge data to the post-processing path. Therefore, the performance impact of calculating edge distances in hardware can be minimal.
[0067] Various aspects of this disclosure may also include novel schemes for compressing edge data. Based on the observation that two edges per pixel may be sufficient to cover most (e.g., over 99%) of the geometric edge information for blending, this disclosure can compress edge data to improve hardware efficiency while maintaining quality levels. In some aspects, the blending algorithm described herein can blend the colors of adjacent pixels based on the coverage of pixels by visible primitives, and fine-tune the blending factor using the z-values of adjacent pixels. This novel blending algorithm described herein can provide smooth blending across colors of adjacent pixels and takes into account jagged edges. Various aspects of this disclosure can also be applied to contour edges or all primitive edges. Furthermore, various aspects of this disclosure may include multiple enhancements to the partitioning architecture to accommodate the algorithm. For example, the hardware solution described herein can use an extended partitioning concept to enhance the existing basic partitioning architecture and / or utilize on-chip geometry buffers to store edge data.
[0068] In some aspects, when a pixel is partially covered by primitives, its color can be determined by sample coverage. In some anti-aliasing methods (e.g., MSAA-1x), the sample location is the center of the pixel, which determines the color for the entire pixel. In other anti-aliasing methods (e.g., MSAA-4x), four sample locations are evaluated for coverage, and the blend of these colors can be the final pixel color. Furthermore, in distance-based methods, the pixel region covered by primitives can be used as a blending factor with neighboring pixels. Therefore, in MSAA-1x, the pixel color (pixColor) is the color of the primitive covering the center of the pixel. In MSAA-4x, the pixel color is a blend of the colors of the coverage based on four samples. In the ECAA method presented in this paper, the pixel color can be a blend of the colors of neighboring pixels based on region coverage, where the blending factor is the percentage of the covered region. In some aspects, pixel edges can be measured horizontally or vertically.
[0069] Figure 5 Scene 500, including pixels and primitives, is illustrated using one or more techniques according to this disclosure. For example... Figure 5 As shown, scene 500 includes primitive 502, pixel 510, pixel center 512, pixel 520, and pixel center 522. Scene 500 also includes distances 514 and 516. Figure 5 As shown, distance 514 is the width of the light gray speckled pattern of pixel 510, for example, 60% of pixel 510. Distance 516 is the width of the slanted gray line pattern of pixel 520, for example, 40% of pixel 510.
[0070] like Figure 5As shown, pixel 510 is partially covered by primitive 502. Furthermore, the center of pixel 510 is covered by primitive 502. In the ECAA method of this paper, the distance from the pixel center to the edge of the primitive is evaluated to obtain the blending factor. According to the ECAA method of this paper, the distance from the pixel center to the edge of the primitive indicates 60% coverage. Therefore, the color of pixel 510 can be blended into a 60% light gray speckle pattern and a 40% slanted gray line pattern.
[0071] In some aspects, after selecting a pixel-to-edge distance scheme, the driver can set additional GPU hardware states to compute and / or store additional edge distance information during the rendering pass. The GPU can store this additional edge information along with other render target data (e.g., depth and color information). Furthermore, when the hardware rasterizer encounters a subpixel primitive, the pixel-to-edge distance can be updated to account for new edges from the subpixel primitive, i.e., auxiliary edges. During the resolution operation, a custom post-processing shader can be invoked, which uses edge, depth, and / or color information to blend adjacent pixels to mitigate aliasing artifacts.
[0072] Figure 6 A schematic diagram 600 illustrates an anti-aliasing method incorporating one or more techniques according to this disclosure. For example... Figure 6 As shown, schematic diagram 600 includes a vertex processing unit 602, a primitive processing unit 604, a rasterization unit 606, a fragment processing unit 608, a Z-test or blending unit 610, an on-chip buffer 620 (which may include a depth or color buffer 622), and a pixel resolution unit 690 (which may include a post-processing path). Schematic diagram 600 also includes an edge computing flow 640, which may include a pixel-to-edge computing unit 650, an edge information unit 660, and an on-chip buffer 680. The on-chip buffer 680 may include an auxiliary unit 682 and a center unit 684.
[0073] like Figure 6 As shown, the on-chip buffer 620 can send depth or color information 626 to the pixel resolution unit 690. Furthermore, the pixel-to-edge calculation unit 650 can send updated auxiliary edges 652 to the on-chip buffer 680, and vice versa. The edge information unit 660 can send written visible edges 662 to the on-chip buffer 680, and vice versa. Additionally, the on-chip buffer 680 can set auxiliary information and center edge information 688 for the pixel resolution unit 690. Based on the above, the pixel resolution unit 690 can output the final pixel color 692. Figure 6As shown, this technique can estimate pixel coverage using the distance from the pixel center to the primitive edge. In this disclosure, the distance from the edge to the pixel center along the x and y axes can be used for blending with horizontally or vertically adjacent pixels, and therefore the axial distance from the pixel center can also be calculated.
[0074] Figure 7 A schematic diagram 700 illustrates one or more techniques according to this disclosure, including axial distance calculation. (See diagram 700.) Figure 7 As shown, schematic diagram 700 includes the calculation of the axial distance between the primitive edge 710 and the pixel center 720. For example... Figure 7 As shown, the equation (ax + by + c) can be applied to primitive edge 710. Furthermore, pixel center 720 can be (x0, y0). The x-distance (dx) and y-distance (dy) from pixel center 720 to edge 710 are evaluated as follows. For example, evaluating (x0, y0) relative to edge 710 (ax + by + c) yields a distance d. Furthermore, the sign of d indicates whether the point is to the left or right of edge 710. Therefore, the equation can be ax0 + by0 + c = d (Equation 1).
[0075] Furthermore, if (x1, y0) and (x0, y1) are the horizontal and vertical projections on edge 710, then these can be points on the line of the edge equation. Therefore, this disclosure can be evaluated as 0: ax1 + by0 + c = 0 (Equation 2) and ax0 + by1 + c = 0 (Equation 3). Furthermore, this disclosure can also calculate the x and y axial distances to the line equation: (Eq1 - Eq2) => dx = |x0 - x1| = d / a and (Eq1 - Eq3) => dy = |y0 - y1| = d / b.
[0076] Furthermore, in this disclosure, a 4-bit distance metric can be used. Therefore, edges within the pixel distance (i.e., the distance between the centers of two adjacent pixels) can be used for blending. Any value exceeding the pixel distance can be ignored, and such a distance can be represented by 0xF. Therefore, dx and dy in the interval [0,1] indicated as [0x0,0xE] can have equal or uniform step sizes. Furthermore, dx and dy in the interval [1,inf] can be indicated as 0xF.
[0077] In some aspects, for each pixel, additional edge storage information may be needed to store distance information along four directions (e.g., top, left, bottom, and right). Therefore, this disclosure can store edge data for a pixel along four directions (e.g., top, left, bottom, and right). In the final visibility information, all edge data for visible primitives can be stored. Furthermore, pixel-to-edge distance values from visible primitives at the pixel (which are z-tested) are stored. Therefore, the final edge information stored at the pixel can be from visible primitives covering the center of the pixel. This information can be stored in a buffer (e.g., an edge buffer).
[0078] Various aspects of this disclosure may also include a blending algorithm that operates on the final color buffer after the rendering pass is complete. To calculate the blended color of a pixel, the blending algorithm uses color, edge, and depth information available at each pixel and its four neighboring pixels. For example, the input may be a color buffer, a Z-buffer, and an edge buffer. Furthermore, the output may be a new color buffer. To blend colors between two adjacent pixels, a blending factor can be calculated based on the available edge information and its depth value. Depending on the distance, the algorithm may have multiple different scenarios (e.g., 10 scenarios) for blending, and in some cases, z-information may be used to determine the blending factor.
[0079] Figure 8 A scene 800 including pixels and primitives is shown, illustrating one or more techniques according to this disclosure. For example... Figure 8 As shown, scene 800 includes pixel 810, pixel center 812, pixel 820, pixel center 822, primitive 830, and primitive 840. Scene 800 also includes distances 852 and 854. Figure 8 As shown, distance 854 is the distance from pixel center 812 towards the edge of pixel 820 to primitive 830. Furthermore, distance 852 is the distance from pixel center 822 towards the edge of pixel 810 to primitive 840.
[0080] like Figure 8 As shown, pixel 810 is partially covered by primitive 830. Furthermore, the center of pixel 810 (e.g., pixel center 812) is covered by primitive 830. Figure 8As further shown, image 820 is partially covered by primitive 840. Furthermore, the center of image 820 (e.g., pixel center 822) is covered by primitive 840. In some aspects, the distance between pixel center 812 and pixel center 822 can be considered as a value of 1. Additionally, the Z values of pixels 810 and 820 can determine which primitive precedes the other. Therefore, when two different pixels (e.g., pixels 810 and 820) are mixed, this disclosure can determine the coverage area for a pixel based on visible primitives. This can be done for each of a plurality of pixels.
[0081] In some rasterization algorithms, the pixel center, which is part of a primitive, can be rasterized. If a primitive covers one of the pixel centers of its neighboring pixels, the edge value is recorded as part of the pixel edge information. However, there may be primitives that cover a single pixel or parts of two adjacent pixels but not the center of any of them. Such primitives (whose width is less than the pixel distance and / or are not recorded by any pixel) may cause artifacts during blending with neighboring pixels.
[0082] For example, consider triangles T1 and T2 and pixels (0,0), (1,0), (0,1), and (1,1). T2 partially covers pixels (0,0) and (1,0). Therefore, in ideal blending cases, the color of T2 should be (partially) blended into the colors of these pixels. The ECAA method in this paper can also handle blending based on multiple distances. For example, the left and right distances are measured as follows (0xF, 15 = pixel distance). For Pix(0,0) and Pix(1,0), there may be no recorded edges, and L = 15, R = 15 (default). Furthermore, for Pix(0,1), R = 2 and L = 13. For Pix(1,1), R = 15 and L = 2. Based on the blending algorithm, ECAA can blend the following cases: Pix(0,0) = blended with the right pixel, Pix(1,1) = blended with the left pixel, Pix[(1,0),(0,1)] = no blending. In some instances, this can result in the inversion of the mixed colors.
[0083] To handle such cases in ECAA, it may be necessary to consider the overlay from sub-pixel primitives to calculate the blending factor. This could lead to conservative rasterization, meaning that if a primitive partially covers a pixel, the pixel may need to be rasterized regardless of whether its pixel center is covered. This allows for processing of partial pixels. Furthermore, the edge distance calculation logic may need to be updated to handle sub-pixel primitives. This paper will explain the algorithm in further detail.
[0084] In some aspects, for a given pixel, auxiliary edges may be defined as a pair of edges of a primitive that may not cover the pixel center of the current pixel or its adjacent pixels. This situation may occur when the primitive has a sub-pixel width and does not cover the centers of two adjacent pixels. An auxiliary primitive may be defined as a primitive that does not cover the centers of two adjacent pixels and is located between two pixel centers. It may be part of one pixel or two pixels. For example, if d1 and d2 are the distances from the pixel to the two edges, the primitive is an auxiliary primitive (auxPrimitive) if: auxPrimitive = (d1 < pixDist) and (d2 < pixDist). In some aspects, the present disclosure may store the two edges at distances d1 and d2 as an auxiliary pair in pixel P1. They may also qualify as auxiliary edges for pixel P2, but in this algorithm, they may be stored as part of the left (or top) pixel. Furthermore, the present disclosure may also store the two edges as auxiliary edges of pixel P2. Furthermore, the edges may not form an auxiliary edge pair for pixel P2 because they cover the pixel center of pixel P1.
[0085] In some aspects, for each pixel, additional storage may be allocated to store auxiliary edge information (auxEdge) and edge information (centerEdge) of primitives covering the pixel center. If the auxiliary primitive forms a mesh (or a common edge) with the primitive covering the pixel center, the auxiliary edge distance may be used to update the center edge distance value. This ensures that coverage from sub-pixel primitives is also taken into account when calculating the blending factor using adjacent pixel colors.
[0086] Figure 9 Illustrates a scenario 900 including pixels and primitives in accordance with one or more techniques of the present disclosure. As Figure 9 shown, scenario 900 includes pixel 910, pixel center 912, pixel 920, pixel center 922, primitive 930 and primitive 940. Scenario 900 also includes distance 932, distance 934, distance 942 and distance 944. These distances may be referred to as pixel distances (pixDist). As Figure 9 shown, distance 932 is the distance from pixel center 912 towards pixel 910 to the edge of primitive 930. Furthermore, distance 934 is the distance from pixel center 912 towards pixel 920 to the edge of primitive 930. Distance 942 is the distance from pixel center 922 towards pixel 920 to the edge of primitive 930. In addition, distance 944 is the distance from pixel center 922 towards pixel 910 to the edge of primitive 930.
[0087] As Figure 9As shown, pixel 910 is partially covered by primitive 930. Furthermore, the center of pixel 910 (e.g., pixel center 912) is not covered by primitive 930. Figure 9 As further shown, image 920 is partially covered by primitive 940. Furthermore, the center of pixel 920 (e.g., pixel center 922) is covered by primitive 940.
[0088] exist Figure 9 In this method, primitives 930 and 940 can be rendered in a conservative manner, meaning that even if the center of any partially covered pixel is not covered by a primitive, that pixel is still processed for edge calculation. If primitives 930 and 940 are processed in this order, then when rendering primitive 930, both pixels 910 and 920 are processed because primitive 930 partially covers both pixels 910 and 920. In such a case, this disclosure may optionally store auxiliary edges as part of auxiliary storage for pixel 910. When rendering primitive 940, when primitive 940 covers pixel center 922, pixel 920 can be processed for calculating center-edge distance.
[0089] Render primitives 930 and 940 can generate the following distances relative to the pixel center: for example, the distance from the pixel center to the edge (centerEdge), the distance to the auxiliary edge (auxEdge), and / or auxiliary storage. After rendering primitive 930, pixel 910 may include auxEdge[P1][right] = (d1, d2) and centerEdge = NULL. Furthermore, pixel 920 may include auxEdge = NULL and centerEdge = NULL. After rendering primitive 940, pixel 910 may not include changes to the previous state, auxEdge[P1][right] = (d1, d2) and centerEdge = NULL. Furthermore, pixel 920 may include centerEdge[P2][left] = d3 and auxEdge = NULL.
[0090] In some aspects, during post-processing of edges, mesh detection can be performed by comparing auxiliary edge and center edge information between adjacent pixels. In this case, the present disclosure can check the following condition to form a mesh (isMesh): isMesh = if(centerEdge[P2][left] + auxEdge[P1][right] == pixDist). If this condition evaluates to true, the center edge of pixel 920 can be updated by including subprime overlays centerEdge[P2][left] = pixDist – d1 = d4.
[0091] In some respects, this disclosure may assume that the color of the auxiliary primitive is the same as that of the primitives that form the mesh with it. This is likely to be common if the primitives or triangles belong to the same object. Furthermore, it may be assumed that primitives or triangles from different objects rarely form meshes, and therefore, it is unlikely that auxiliary primitives will be clubbed from different objects. Moreover, multiple auxiliary primitives may not be common, and empirical data suggests that in most pixels, there is no more than one auxiliary primitive per pixel. Therefore, a method of storing one auxiliary edge per direction may be able to handle most practical cases and represents a trade-off between hardware complexity and quality. Furthermore, the current proposal can utilize one auxiliary storage per pixel per direction. Therefore, ECAA with auxEdge storage as described herein can handle subpixel primitives and thereby mitigate any artifacts. Furthermore, the per-pixel byte condition for ECAA with auxiliary edges as described herein can be lower than other techniques (e.g., MSAA-4x).
[0092] Figure 10 A schematic diagram 1000 illustrates an anti-aliasing method according to one or more techniques based on this disclosure. For example... Figure 10 As shown, at 1010, this disclosure determines whether the primitive covers the pixel center. If so, at 1060, this disclosure calculates the distance to the edge of the primitive in all directions. If not, at 1020, this disclosure calculates the minimum and maximum distances in each direction.
[0093] At 1030, this disclosure determines whether the auxiliary edge (d0, d1) is less than 1. If not, at 1032, this disclosure discards the edge information. If yes, at 1040, this disclosure determines whether isMesh d0 is equal to dmax. If no, at 1042, this disclosure stores (d0, d1) in the auxiliary edge for that pixel and orientation. If yes, at 1050, this disclosure updates the distance and stores (dmin, d1) in the auxiliary edge for that pixel and orientation. Next, this disclosure may send the auxiliary edge 1052 to on-chip storage 1090.
[0094] At 1070, this disclosure can determine whether the Z test passes. If not, at 1072, this disclosure discards the edge information. If yes, at 1080, this disclosure stores the pixel distance, as well as both the pixel and orientation, in the centerEdge. This disclosure can then send the centerEdge information 1082, Z 1084, and color 1086 to on-chip storage 1090. On-chip storage 1090 can store color, depth, and / or edge data.
[0095] Figure 10 This document illustrates the overall flow of edge computation described herein. For each pixel, this disclosure may reserve additional storage in a geometry buffer located in on-chip storage 1090. In some aspects, 16 bits of data per pixel may be required to store centerEdge information, and a 4-bit distance to the primitive edge may be needed in each direction. This can also be computed for pixels whose center is covered by the primitive. Furthermore, 32 bits of data per pixel may be required to store auxEdge information. A pair of 4-bit edge distances may be needed in each direction. This can also be computed for pixels partially covered by the primitive but whose center is not covered.
[0096] As indicated above, conservative rasterization in the rasterizer block can process pixels even if their pixel center is not covered by primitives. In some aspects, if the pixel center is covered by primitives, the centerEdge can be computed. If the pixel is partially covered by primitives but not its center, the auxEdge can be computed. Furthermore, to compute the centerEdge value at a pixel for a given primitive, the axial distances from the pixel center to the three edges are evaluated in the x and y directions. If there is more than one edge in one direction, the minimum of the distances can be stored. This center distance can be passed to downstream units, and if the primitive passes the Z-test for that pixel location, the centerEdge value can be written to an on-chip buffer; otherwise, the value can be discarded.
[0097] To calculate the auxEdge value at a pixel for a given primitive, the xy-axis distance from the pixel center to the edge can be calculated. For auxiliary primitives, a pair of edges (sub-pixel primitives) can exist within the pixel distance. Therefore, when such edges are found, the (minimum, maximum) edge distance pairs in each direction can be stored. If the auxEdge is valid for the pixel, it can be compared with any existing auxEdge to check for mesh formation. In such cases, the auxEdge distance can be updated for that direction. For example, if a pixel has (2,4) as its auxEdge in the left direction and encounters a new auxEdge (4,8) from the next primitive in the same direction, the auxEdge in the left direction can be updated to (2,8). If it does not form a mesh, the latest value can be written to the auxEdge value. This updated auxEdge value can be stored in the on-chip buffer. Once all rendering passes are complete, the edgeBuffer in the on-chip buffer can contain the updated distance (centerEdge, auxEdge) for each pixel. This can then be used by a post-processing shader to update the color buffer by blending it with neighboring pixels based on edge data.
[0098] In some respects, the post-processing shader in this paper can involve multiple steps, such as updating the center edge distance based on auxiliary edge data by examining the formation of the mesh between primitives. This can also be combined with neighboring pixels along the four directions. The blending factor can be calculated independently relative to each direction, and the average pixel color can be calculated.
[0099] As indicated above, the anti-aliasing method of this disclosure can achieve high quality with reduced execution overhead and storage requirements. Compared to other anti-aliasing methods, this disclosure can significantly reduce storage overhead. In some aspects, data from two directions (one from the horizontal axis and the other from the vertical axis) can be stored. Therefore, the amount of data stored can be reduced. This technique can also produce images of similar visual quality with fewer artifacts.
[0100] In some aspects, this disclosure can detect subpixel primitives. This disclosure can also update the pixel-to-edge distance buffer to account for new edge information. Various aspects of this disclosure can also propose novel hardware architectures that compute pixel-to-edge information based on input geometry information, store edge data in an additional buffer (e.g., an edge buffer) by compressing the edge data, and update it when the GPU encounters a subpixel primitive.
[0101] As noted above, some anti-aliasing schemes can blend the colors of adjacent pixels based on the coverage of pixels by visible primitives. Aspects of this disclosure can utilize the depth values of adjacent pixels to fine-tune the blending factor and achieve better quality. The solution can be configured to blend pixels at contour edges or all primitive edge pixels. In this disclosure, the blending algorithm can operate on the final color buffer after the rendering pass is complete. To calculate the blended color of a pixel, this disclosure can use color, edge, and / or depth information available at each pixel and its four neighboring pixels. Therefore, the input can be a color buffer, a Z-buffer, and an edge buffer. Furthermore, the output can be a new color buffer.
[0102] To blend colors between two adjacent pixels, a blending factor can be calculated based on available edge information and their depth values. Depending on the distance, the algorithm can have 10 different scenarios for blending, and in some cases, z-information can be used to determine the blending factor. For example, blending pixel A with pixel B can include: vector AB (distance from pixel A to the edge towards pixel B), vector BA (distance from pixel B to the edge towards pixel A), the distance between the center of pixel A and the center of pixel B can be considered as a value of 1, and the Z-values of pixel A and pixel B can determine which one is in front of the other. Therefore, edge data compared to neighboring primitives for each of multiple pixels can be stored. This edge data can then be utilized in the blending path, where colors between two adjacent pixels are blended. Thus, the blending path can consider the coverage of adjacent pixels and then blend the colors of pixels and / or smooth the edges of pixels based on pixel coverage information.
[0103] The algorithm of this disclosure can be implemented on tile-based GPU architectures with additional advantages, where the entire process is performed on a per-tile basis. This disclosure can optionally discard edge information, which can further achieve bandwidth savings. When extended partitioning is enabled, partitioning can be used with the algorithm. Extended partitioning can extend further into adjacent partitions, for example, extending by 16 pixels. This adjacent pixel data can be used for blending. When performing partitioning, this disclosure may need to know the pixels at the boundaries of the partitions in order to blend accurately along the boundaries of the partitions.
[0104] As indicated above, aspects of this disclosure can achieve high rendering quality with significantly lower storage requirements (e.g., a 50% reduction in storage) and reduced execution overhead (e.g., a reduction of more than 30-50%). Aspects of this disclosure can also detect subpixel primitives and update pixel-to-edge distance buffers to account for auxiliary edges. Aspects of this disclosure can also use depth information in the blending path to achieve better anti-aliasing. Aspects of this disclosure can also use edge buffers to develop custom post-processing algorithms for better visual quality.
[0105] Various aspects of this disclosure can process subpixel primitives by detecting such situations and updating edge distances upon detecting mesh formation of the subpixel primitive. This ensures that overlays due to small or thin triangles are not lost, and therefore artifacts caused by these triangles are avoided. Various aspects of this disclosure may also include advanced post-processing algorithms, such as detecting edges before performing any anti-aliasing operations. Opening edge data in a geometry buffer to such a parsing algorithm can improve efficiency by rapidly inferring geometry edge information and enables more advanced schemes.
[0106] Figure 5-10 Examples of the aforementioned methods and processes for edge compression anti-aliasing (ECAA) are shown. Figure 5-10 As shown, various aspects of this disclosure (e.g., GPU and CPU herein) can perform multiple different steps or processes for ECAA to reduce storage requirements and / or execution overhead. For example, the GPU herein can calculate the center-edge distance (e.g., distance 854) of a first pixel (e.g., pixel 810) among a plurality of pixels, the center-edge distance of the first pixel being equal to the distance from the center of the first pixel (e.g., pixel center 812) to one or more edges of a first primitive (e.g., primitive 830) among a plurality of primitives in the scene, wherein at least a portion of the first primitive (e.g., primitive 830) may overlap with the center of the first pixel (e.g., pixel center 812).
[0107] The GPU described in this paper can also determine whether a first primitive (e.g., primitive 830) is visible in the scene. The GPU described in this paper can also determine whether a portion of a first pixel (e.g., pixel 920) overlaps with at least one auxiliary primitive (e.g., primitive 930) among a plurality of primitives. Furthermore, when a portion of the first pixel (e.g., pixel 920) overlaps with at least one auxiliary primitive (e.g., primitive 930), the GPU described in this paper can calculate the distance (e.g., distance 942) from the center of the first pixel to one or more edges of the at least one auxiliary primitive.
[0108] When the first primitive (e.g., primitive 830) is visible in the scene, the GPU described herein can also store the center-edge distance (e.g., distance 854) of the first pixel (e.g., pixel 810). In some aspects, when the first primitive (e.g., primitive 830) is visible in the scene, the center-edge distance (e.g., distance 854) of the first pixel (e.g., pixel 810) can be stored in an edge buffer. Furthermore, when stored in the edge buffer, the center-edge distance (e.g., distance 854) of the first pixel (e.g., pixel 810) can be compressed.
[0109] Furthermore, when a portion of a first pixel (e.g., pixel 920) overlaps with at least one auxiliary primitive (e.g., primitive 930), the GPU described herein can store the distance (e.g., distance 942) from the center of the first pixel to one or more edges of the at least one auxiliary primitive in an auxiliary buffer. The GPU described herein can also determine whether the depth of the first primitive (e.g., primitive 830) is less than or greater than the depth of the second primitive (e.g., primitive 840).
[0110] The GPU described herein can also determine the amount of overlap between a first pixel (e.g., pixel 810) and a first primitive (e.g., primitive 830). In some aspects, the amount of overlap between the first pixel and the first primitive (e.g., primitive 830) can be determined based on at least one of the center-edge distance of the first pixel (e.g., pixel 810) or the center-edge distance of the second pixel (e.g., pixel 820), wherein the center-edge distance of the second pixel can be equal to the distance from the center of the second pixel to one or more edges of the second primitive (e.g., primitive 840) among a plurality of primitives. In some instances, the amount of overlap between the first pixel (e.g., pixel 810) and the first primitive (e.g., primitive 830) can be determined based on the depth of the first primitive (e.g., primitive 830) and the depth of the second primitive (e.g., primitive 840) among a plurality of primitives. In some aspects, the amount of overlap between the first pixel (e.g., pixel 810) and the first primitive (e.g., primitive 830) can be equal to a portion of the region of the first pixel that overlaps with the first primitive. Furthermore, when at least one auxiliary primitive (e.g., primitive 930) forms a mesh with the first primitive (e.g., primitive 940), the GPU described herein can update the amount of overlap between the first pixel (e.g., pixel 920) and the first primitive (e.g., primitive 940).
[0111] The GPU described herein can also mix the color of a first pixel with the color of a second pixel (e.g., pixel 820) based on at least one of the center-edge distance (e.g., distance 854) of a first pixel (e.g., pixel 810) or the amount of overlap between the first pixel and a first primitive (e.g., primitive 830). In some aspects, the color of the first pixel can be mixed with the color of the second pixel (e.g., pixel 820) for a portion of the first pixel (e.g., pixel 810) that does not overlap with the first primitive (e.g., primitive 830). Furthermore, the first pixel (e.g., pixel 810) can be adjacent to the second pixel (e.g., pixel 820). In some instances, the color of the first pixel (e.g., pixel 810) can be equal to the color of the first primitive (e.g., primitive 830), and the color of the second pixel (e.g., pixel 820) can be equal to the color of the second primitive (e.g., primitive 840).
[0112] In some aspects, when one of a plurality of primitives (e.g., primitive 830) overlaps with the center of a pixel (e.g., pixel center 812), a center-edge distance (e.g., distance 854) can be calculated for each of the plurality of pixels (e.g., pixel 810). Furthermore, one or more edges of the first primitive (e.g., primitive 830) may include at least one of the following: top edge, bottom edge, left edge, and right edge. The center-edge distance (e.g., distance 854) of the first pixel (e.g., pixel 810) may also be calculated in the rendering pass. Additionally, the plurality of primitives may include a plurality of sub-pixel primitives.
[0113] Figure 11 A flowchart 1100 illustrates an example method according to one or more techniques of this disclosure. The method can be performed by a device such as a CPU, GPU, or a graphics processing apparatus. At 1102, the apparatus can calculate the center-edge distance of a first pixel among a plurality of pixels, the center-edge distance of the first pixel being equal to the distance from the center of the first pixel to one or more edges of the first primitive among a plurality of primitives in the scene, wherein at least a portion of the first primitive may overlap with the center of the first pixel, as in combination with... Figure 5-10 The example described in [the document / reference] is as follows.
[0114] At position 1104, the device can determine whether the first primitive is visible in the scene, such as in combination with... Figure 5-10 As described in the example. At 1106, the device can determine whether a portion of the first pixel overlaps with at least one auxiliary primitive among a plurality of primitives, such as in combination. Figure 5-10 As described in the example. At 1108, when a portion of the first pixel overlaps with at least one auxiliary primitive, the apparatus can calculate the distance from the center of the first pixel to one or more edges of the at least one auxiliary primitive, as combined with... Figure 5-10 The example described in [the document / reference] is as follows.
[0115] At 1110, when the first primitive is visible in the scene, the device can store the center-edge distance of the first pixel, such as in combination with... Figure 5-10 The example described in [the document] illustrates this. In some aspects, when the first primitive is visible in the scene, the center-edge distance of the first pixel can be stored in an edge buffer, as in combination with [other parameters]. Figure 5-10 The example described in [the document] further illustrates this. Additionally, when stored in an edge buffer, the center-edge distance of the first pixel can be compressed, as in [the context of] combining [the data]. Figure 5-10 As described in the example. At 1112, when a portion of the first pixel overlaps with at least one auxiliary primitive, the device can store the distance from the center of the first pixel to one or more edges of the at least one auxiliary primitive in the auxiliary buffer, as in combination with... Figure 5-10 The example described in [the document / reference] is as follows.
[0116] At position 1114, the device can determine whether the depth of the first primitive is less than or greater than the depth of the second primitive, such as in combination with... Figure 5-10 As described in the example. At 1116, the device can determine the amount of overlap between the first pixel and the first primitive, as in conjunction with... Figure 5-10 As described in the example. In some aspects, the amount of overlap between the first pixel and the first primitive can be determined based on at least one of the center-edge distance of the first pixel or the center-edge distance of the second pixel, wherein the center-edge distance of the second pixel can be equal to the distance from the center of the second pixel to one or more edges of the second primitive among a plurality of primitives, as combined Figure 5-10 The example described in [the document] illustrates this. In some instances, the amount of overlap between the first pixel and the first primitive can be determined based on the depth of the first primitive and the depth of the second primitive among multiple primitives, such as by combining [the two primitives]. Figure 5-10 The example described in [the document] illustrates this. In some aspects, the amount of overlap between the first pixel and the first primitive can be equal to a portion of the region of the first pixel that overlaps with the first primitive, such as in combination with [other methods]. Figure 5-10 As described in the example. At 1118, when at least one auxiliary primitive forms a mesh with the first primitive, the device can update the amount of overlap between the first pixel and the first primitive, as in combination with... Figure 5-10 The example described in [the document / reference] is as follows.
[0117] At 1120, the device can mix the color of the first pixel with the color of the second pixel based on at least one of the center-edge distance of the first pixel or the amount of overlap between the first pixel and the first primitive, such as combining... Figure 5-10 The example described in [the document] illustrates this. In some aspects, the color of the first pixel can be mixed with the color of the second pixel for a portion of the first pixel that does not overlap with the first primitive, such as by combining [the two pixels]. Figure 5-10 The example described in [the document] further illustrates this. Additionally, the first pixel can be adjacent to the second pixel, as in [the context of] combining [the two pixels]. Figure 5-10 The examples described herein. In some instances, the color of the first pixel can be equal to the color of the first primitive, and the color of the second pixel can be equal to the color of the second primitive, as in combination. Figure 5-10 The example described in [the document / reference] is as follows.
[0118] In some aspects, when one of a plurality of primitives overlaps with the center of a pixel, the center-edge distance can be calculated for each of the plurality of pixels, such as by combining Figure 5-10 As described in the example. Furthermore, one or more edges of the first primitive may include at least one of the following: top edge, bottom edge, left edge, and right edge, as combined... Figure 5-10The example described in [the example] illustrates this. The center-edge distance of the first pixel can also be calculated in the rendering path. Furthermore, multiple primitives can include multiple sub-pixel primitives, such as in combination. Figure 5-10 The example described in [the document / reference] is as follows.
[0119] In one configuration, a method or apparatus for graphics processing is provided. The apparatus may be a CPU, a GPU, or some other processor capable of performing graphics processing. In one aspect, the apparatus may be a processing unit 120 within device 104, or some other hardware within device 104 or another device. The apparatus may include a unit for calculating a center-edge distance of a first pixel among a plurality of pixels, the center-edge distance of the first pixel being equal to the distance from the center of the first pixel to one or more edges of a first primitive among a plurality of primitives in a scene, wherein at least a portion of the first primitive may overlap with the center of the first pixel. The apparatus may also include a unit for storing the center-edge distance of the first pixel when the first primitive is visible in the scene. The apparatus may also include a unit for determining an amount of overlap between the first pixel and a first primitive based on the depth of the first primitive and the depth of a second primitive among a plurality of primitives. The apparatus may also include a unit for mixing the color of the first pixel with the color of a second pixel based on at least one of the center-edge distance of the first pixel or the amount of overlap between the first pixel and the first primitive. The apparatus may also include a unit for determining whether a portion of the first pixel overlaps with at least one auxiliary primitive among a plurality of primitives. The apparatus may further include a unit for updating the amount of overlap between the first pixel and the first primitive when at least one auxiliary primitive forms a mesh with the first primitive. The apparatus may further include a unit for calculating the distance from the center of the first pixel to one or more edges of the at least one auxiliary primitive when a portion of the first pixel overlaps with at least one auxiliary primitive. The apparatus may further include a unit for storing the distance from the center of the first pixel to one or more edges of the at least one auxiliary primitive in an auxiliary buffer when a portion of the first pixel overlaps with at least one auxiliary primitive. The apparatus may further include a unit for determining whether the depth of the first primitive is less than or greater than the depth of a second primitive. The apparatus may further include a unit for determining whether the first primitive is visible in the scene.
[0120] The subjects described herein can be implemented to achieve one or more benefits or advantages. For example, the described graphics processing techniques can be used by a GPU, CPU, or some other processor capable of performing graphics processing to implement the multipath tessellation technique described herein. This can also be implemented at a lower cost compared to other graphics processing techniques. Furthermore, the graphics processing techniques described herein can improve or accelerate data processing or execution. Further, the graphics processing techniques described herein can improve resource or data utilization and / or resource efficiency. Additionally, aspects of this disclosure can utilize ECAA techniques to reduce storage requirements and / or reduce execution overhead.
[0121] According to this disclosure, unless otherwise specified in the context, the term "or" may be interpreted as "and / or". Additionally, while phrases such as "one or more" or "at least one" may be used for some features disclosed herein but not for others, features not using such language may be interpreted as implying such a meaning unless otherwise specified in the context.
[0122] In one or more examples, the functionality described herein may be implemented in hardware, software, firmware, or any combination thereof. For example, although the term “processing unit” has been used throughout this disclosure, such a processing unit may be implemented in hardware, software, firmware, or any combination thereof. If any functionality, processing unit, technique, or other module described herein is implemented in software, the functionality, processing unit, technique, or other module described herein may be stored on or transmitted via a computer-readable medium as one or more instructions or code. A computer-readable medium may include a computer data storage medium or a communication medium, including any medium that facilitates the transfer of a computer program from one place to another. In this way, a computer-readable medium may generally correspond to: (1) a non-transitory tangible computer-readable storage medium; or (2) a communication medium such as a signal or carrier wave. A data storage medium may be any available medium that can be accessed by one or more computers or one or more processors to retrieve instructions, code, and / or data structures used to implement the techniques described herein. By way of example, and not limitation, such a computer-readable medium may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage, or other magnetic storage devices. As used herein, disks and optical discs include compact optical discs (CDs), laser optical discs, optical discs, digital versatile optical discs (DVDs), floppy disks, and Blu-ray discs, wherein disks typically copy data magnetically, while optical discs use lasers to copy data optically. Combinations of the above should also be included within the scope of computer-readable media. Computer program products may include computer-readable media.
[0123] The code can be executed by one or more processors, such as one or more digital signal processors (DSPs), general-purpose microprocessors, application-specific integrated circuits (ASICs), arithmetic logic units (ALUs), field-programmable arrays (FPGAs), or other equivalent integrated or discrete logic circuits. Therefore, the term "processor" as used herein can refer to any of the foregoing structures or any other structure suitable for implementing the techniques described herein. Furthermore, the techniques can be sufficiently implemented in one or more circuit or logic elements.
[0124] The techniques disclosed herein can be implemented in a wide variety of devices or apparatuses, including wireless mobile phones, integrated circuits (ICs), or a set of ICs (e.g., chipsets). Various components, modules, or units are described in this disclosure to emphasize functional aspects of a device configured to perform the disclosed techniques, but they do not necessarily require implementation through different hardware units. Specifically, as described above, the various units can be combined in any hardware unit, or provided by a batch of interoperable hardware units (including one or more processors as described above) combined with suitable software and / or firmware.
[0125] Examples have been described. These and other examples are within the scope of the following claims.
Claims
1. A method for image processing, comprising: Calculate the center-edge distance of a first pixel among a plurality of pixels, wherein the center-edge distance of the first pixel is equal to the distance from the center of the first pixel to one or more edges of a first primitive among a plurality of primitives in the scene, wherein at least a portion of the first primitive overlaps with the center of the first pixel; Determine whether a portion of the first pixel overlaps with at least one auxiliary primitive among the plurality of primitives, wherein the auxiliary primitive is located between the center of the first pixel and the center of a second pixel adjacent to the first pixel among the plurality of pixels, wherein the auxiliary primitive does not cover the center of the first pixel or the center of the second pixel; When a portion of the first pixel overlaps with the at least one auxiliary primitive, the distance from the center of the first pixel to one or more edges of the at least one auxiliary primitive is calculated; When the first primitive is visible in the scene, the center-edge distance of the first pixel is stored; Determine the amount of overlap between the first pixel and the first primitive; and The color of the first pixel is mixed with the color of the second pixel based on at least one of the center-edge distance of the first pixel or the amount of overlap between the first pixel and the first primitive, and also based on the distance from the center of the first pixel to one or more edges of the at least one auxiliary primitive.
2. The method according to claim 1, further comprising: When the at least one auxiliary primitive forms a mesh with the first primitive, the overlap between the first pixel and the first primitive is updated.
3. The method according to claim 2, comprising: In response to determining that the center-edge distance of the first pixel and the distance from the center of the second pixel to the one or more edges of the at least one auxiliary primitive are equal to the distance between the centers of two adjacent pixels, it is determined that the at least one auxiliary primitive forms a mesh with the first primitive.
4. The method of claim 2, wherein, Updating the overlap between the first pixel and the first primitive includes setting the overlap to be equal to the distance between two adjacent pixels minus the distance from the center of the first pixel to one or more edges of the at least one auxiliary primitive.
5. The method of claim 2, further comprising: In response to determining that the at least one auxiliary primitive forms a mesh with the first primitive, the color of the at least one auxiliary primitive is set to be equal to the color of the first primitive, and the color of the first pixel is mixed with the color of the second pixel based on the set color of the at least one auxiliary primitive.
6. The method according to claim 1, further comprising: When a portion of the first pixel overlaps with the at least one auxiliary primitive, the distance from the center of the first pixel to the one or more edges of the at least one auxiliary primitive is stored in the auxiliary buffer.
7. The method according to claim 1, further comprising: Determine whether the depth of the first primitive is less than or greater than the depth of the second primitive.
8. The method according to claim 1, further comprising: Determine whether the first graphic element is visible in the scene.
9. The method of claim 1, wherein, When the first primitive is visible in the scene, the center-edge distance of the first pixel is stored in the edge buffer.
10. The method of claim 9, wherein, The center-edge distance of the first pixel is compressed when it is stored in the edge buffer.
11. The method of claim 1, wherein, The amount of overlap between the first pixel and the first primitive is equal to the portion of the region of the first pixel that overlaps with the first primitive.
12. The method of claim 1, wherein, The color of the first pixel is mixed with the color of the second pixel for the portion of the first pixel that does not overlap with the first primitive.
13. The method of claim 1, wherein, The color of the first pixel is equal to the color of the first primitive, and the color of the second pixel is equal to the color of the second primitive.
14. The method of claim 1, wherein, When one of the plurality of primitives overlaps with the center of the pixel, the center-edge distance is calculated for each of the plurality of pixels.
15. The method of claim 1, wherein, The one or more edges of the first graphic element include at least one of the following: top edge, bottom edge, left edge, and right edge.
16. The method according to claim 1, wherein, The center-edge distance of the first pixel is calculated in the rendering path.
17. The method according to claim 1, wherein, The plurality of primitives includes a plurality of sub-pixel primitives.
18. The method according to claim 1, wherein, The amount of overlap between the first pixel and the first primitive is determined based on at least one of the center-edge distance of the first pixel or the center-edge distance of the second pixel, wherein the center-edge distance of the second pixel is equal to the distance from the center of the second pixel to one or more edges of the second primitive among the plurality of primitives.
19. The method according to claim 1, wherein, The amount of overlap between the first pixel and the first primitive is determined based on the depth of the first primitive and the depth of the second primitive among the plurality of primitives.
20. An apparatus for graphics processing, comprising: Memory; as well as At least one processor, coupled to the memory, is configured to: Calculate the center-edge distance of a first pixel among a plurality of pixels, wherein the center-edge distance of the first pixel is equal to the distance from the center of the first pixel to one or more edges of a first primitive among a plurality of primitives in the scene, wherein at least a portion of the first primitive overlaps with the center of the first pixel; Determine whether a portion of the first pixel overlaps with at least one auxiliary primitive among the plurality of primitives, wherein the auxiliary primitive is located between the center of the first pixel and the center of a second pixel adjacent to the first pixel among the plurality of pixels, wherein the auxiliary primitive does not cover the center of the first pixel or the center of the second pixel; When a portion of the first pixel overlaps with the at least one auxiliary primitive, the distance from the center of the first pixel to one or more edges of the at least one auxiliary primitive is calculated; When the first primitive is visible in the scene, the center-edge distance of the first pixel is stored; Determine the amount of overlap between the first pixel and the first primitive; and The color of the first pixel is mixed with the color of the second pixel based on at least one of the center-edge distance of the first pixel or the amount of overlap between the first pixel and the first primitive, and also based on the distance from the center of the first pixel to one or more edges of the at least one auxiliary primitive.
21. The apparatus according to claim 20, wherein, The at least one processor is further configured to: When the at least one auxiliary primitive forms a mesh with the first primitive, the overlap between the first pixel and the first primitive is updated.
22. The apparatus according to claim 21, wherein, The at least one processor is further configured to: In response to determining that the center-edge distance of the first pixel and the distance from the center of the second pixel to the one or more edges of the at least one auxiliary primitive are equal to the distance between the centers of two adjacent pixels, it is determined that the at least one auxiliary primitive forms a mesh with the first primitive.
23. The apparatus according to claim 21, wherein, Updating the overlap between the first pixel and the first primitive includes setting the overlap to be equal to the distance between two adjacent pixels minus the distance from the center of the first pixel to one or more edges of the at least one auxiliary primitive.
24. The apparatus according to claim 21, wherein, The at least one processor is further configured to: In response to determining that the at least one auxiliary primitive forms a mesh with the first primitive, the color of the at least one auxiliary primitive is set to be equal to the color of the first primitive, and the color of the first pixel is mixed with the color of the second pixel based on the set color of the at least one auxiliary primitive.
25. The apparatus according to claim 20, wherein, The at least one processor is further configured to: When a portion of the first pixel overlaps with the at least one auxiliary primitive, the distance from the center of the first pixel to the one or more edges of the at least one auxiliary primitive is stored in the auxiliary buffer.
26. The apparatus according to claim 20, wherein, The at least one processor is further configured to: Determine whether the depth of the first primitive is less than or greater than the depth of the second primitive.
27. The apparatus according to claim 20, wherein, The at least one processor is further configured to: Determine whether the first graphic element is visible in the scene.
28. The apparatus according to claim 20, wherein, When the first primitive is visible in the scene, the center-edge distance of the first pixel is stored in the edge buffer.
29. The apparatus according to claim 28, wherein, The center-edge distance of the first pixel is compressed when it is stored in the edge buffer.
30. The apparatus according to claim 20, wherein, The amount of overlap between the first pixel and the first primitive is equal to the portion of the region of the first pixel that overlaps with the first primitive.
31. The apparatus according to claim 20, wherein, The color of the first pixel is mixed with the color of the second pixel for the portion of the first pixel that does not overlap with the first primitive.
32. The apparatus according to claim 20, wherein, The color of the first pixel is equal to the color of the first primitive, and the color of the second pixel is equal to the color of the second primitive.
33. The apparatus according to claim 20, wherein, When one of the plurality of primitives overlaps with the center of the pixel, the center-edge distance is calculated for each of the plurality of pixels.
34. The apparatus according to claim 20, wherein, The one or more edges of the first graphic element include at least one of the following: top edge, bottom edge, left edge, and right edge.
35. The apparatus according to claim 20, wherein, The center-edge distance of the first pixel is calculated in the rendering path.
36. The apparatus according to claim 20, wherein, The plurality of primitives includes a plurality of sub-pixel primitives.
37. The apparatus according to claim 20, wherein, The amount of overlap between the first pixel and the first primitive is determined based on at least one of the center-edge distance of the first pixel or the center-edge distance of the second pixel, wherein the center-edge distance of the second pixel is equal to the distance from the center of the second pixel to one or more edges of the second primitive among the plurality of primitives.
38. The apparatus according to claim 20, wherein, The amount of overlap between the first pixel and the first primitive is determined based on the depth of the first primitive and the depth of the second primitive among the plurality of primitives.
39. An apparatus for graphics processing, comprising: A unit for calculating the center-edge distance of a first pixel among a plurality of pixels, the center-edge distance of the first pixel being equal to the distance from the center of the first pixel to one or more edges of a first primitive among a plurality of primitives in the scene, wherein at least a portion of the first primitive overlaps with the center of the first pixel; A unit for determining whether a portion of the first pixel overlaps with at least one auxiliary primitive among the plurality of primitives, wherein the auxiliary primitive is located between the center of the first pixel and the center of a second pixel adjacent to the first pixel among the plurality of pixels, wherein the auxiliary primitive does not cover the center of the first pixel or the center of the second pixel; A unit for calculating the distance from the center of the first pixel to one or more edges of the at least one auxiliary primitive when a portion of the first pixel overlaps with the at least one auxiliary primitive; A unit for storing the center-edge distance of the first pixel when the first primitive is visible in the scene; A unit for determining the amount of overlap between the first pixel and the first primitive; and A unit for mixing the color of the first pixel with the color of the second pixel based on at least one of the center-edge distance of the first pixel or the amount of overlap between the first pixel and the first primitive, and also based on the distance from the center of the first pixel to one or more edges of the at least one auxiliary primitive.
40. The apparatus of claim 39, further comprising: A unit for updating the amount of overlap between the first pixel and the first element when the at least one auxiliary element forms a mesh with the first element.
41. The apparatus of claim 40, further comprising: A cell for determining, in response to determining that the center-edge distance of the first pixel and the distance from the center of the second pixel to one or more edges of the at least one auxiliary primitive are equal to the distance between the centers of two adjacent pixels, that the at least one auxiliary primitive forms a grid with the first primitive.
42. The apparatus according to claim 40, wherein, Updating the overlap between the first pixel and the first primitive includes setting the overlap to be equal to the distance between two adjacent pixels minus the distance from the center of the first pixel to one or more edges of the at least one auxiliary primitive.
43. The apparatus of claim 40, further comprising: A unit for, in response to determining that the at least one auxiliary primitive forms a mesh with the first primitive, setting the color of the at least one auxiliary primitive to be equal to the color of the first primitive and mixing the color of the first pixel with the color of the second pixel based on the set color of the at least one auxiliary primitive.
44. The apparatus of claim 39, further comprising: A unit for storing the distance from the center of the first pixel to one or more edges of the at least one auxiliary primitive in an auxiliary buffer when a portion of the first pixel overlaps with the at least one auxiliary primitive.
45. The apparatus of claim 39, further comprising: A unit used to determine whether the depth of the first primitive is less than or greater than the depth of the second primitive.
46. The apparatus of claim 39, further comprising: A unit used to determine whether the first graphic element is visible in the scene.
47. The apparatus according to claim 39, wherein, When the first primitive is visible in the scene, the center-edge distance of the first pixel is stored in the edge buffer.
48. The apparatus according to claim 47, wherein, The center-edge distance of the first pixel is compressed when it is stored in the edge buffer.
49. The apparatus according to claim 39, wherein, The amount of overlap between the first pixel and the first primitive is equal to the portion of the region of the first pixel that overlaps with the first primitive.
50. The apparatus according to claim 39, wherein, The color of the first pixel is mixed with the color of the second pixel for the portion of the first pixel that does not overlap with the first primitive.
51. The apparatus according to claim 39, wherein, The color of the first pixel is equal to the color of the first primitive, and the color of the second pixel is equal to the color of the second primitive.
52. The apparatus according to claim 39, wherein, When one of the plurality of primitives overlaps with the center of the pixel, the center-edge distance is calculated for each of the plurality of pixels.
53. The apparatus according to claim 39, wherein, The one or more edges of the first graphic element include at least one of the following: top edge, bottom edge, left edge, and right edge.
54. The apparatus according to claim 39, wherein, The center-edge distance of the first pixel is calculated in the rendering path.
55. The apparatus according to claim 39, wherein, The plurality of primitives includes a plurality of sub-pixel primitives.
56. The apparatus according to claim 39, wherein, The amount of overlap between the first pixel and the first primitive is determined based on at least one of the center-edge distance of the first pixel or the center-edge distance of the second pixel, wherein the center-edge distance of the second pixel is equal to the distance from the center of the second pixel to one or more edges of the second primitive among the plurality of primitives.
57. The apparatus according to claim 39, wherein, The amount of overlap between the first pixel and the first primitive is determined based on the depth of the first primitive and the depth of the second primitive among the plurality of primitives.
58. A computer-readable medium storing a computer-executable program for graphics processing, the computer-executable program performing the following operations when executed by a processor: Calculate the center-edge distance of a first pixel among a plurality of pixels, wherein the center-edge distance of the first pixel is equal to the distance from the center of the first pixel to one or more edges of the first primitive among a plurality of primitives in the scene, wherein, At least a portion of the first primitive overlaps with the center of the first pixel; Determine whether a portion of the first pixel overlaps with at least one auxiliary primitive among the plurality of primitives, wherein the auxiliary primitive is located between the center of the first pixel and the center of a second pixel adjacent to the first pixel among the plurality of pixels, wherein the auxiliary primitive does not cover the center of the first pixel or the center of the second pixel; When a portion of the first pixel overlaps with the at least one auxiliary primitive, the distance from the center of the first pixel to one or more edges of the at least one auxiliary primitive is calculated; When the first primitive is visible in the scene, the center-edge distance of the first pixel is stored; Determine the amount of overlap between the first pixel and the first primitive; and The color of the first pixel is mixed with the color of the second pixel based on at least one of the center-edge distance of the first pixel or the amount of overlap between the first pixel and the first primitive, and also based on the distance from the center of the first pixel to one or more edges of the at least one auxiliary primitive.
Citation Information
Patent Citations
Smooth rasterization of polygonal graphics primitives
US20130176330A1