Rendering method, device, electronic device and computer-readable storage medium
By compressing and storing according to the parity of pixel coordinates, the problem of excessive memory occupancy of pixel rendering information in the prior art is solved, and the efficiency of delayed rendering is improved.
Patent Information
- Application Number
- CN202210424423.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-21
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2042-04-21
AI Technical Summary
In the prior art, pixel rendering information occupies too much memory, which reduces the efficiency of delayed rendering.
By compressing and storing according to the parity of pixel coordinates, the memory occupied by pixel rendering information is reduced, and bandwidth calls to pixel rendering information are reduced during the rendering process.
It effectively reduces the memory occupied by pixel rendering information, reduces the bandwidth call to information during rendering, and improves the efficiency of delayed rendering.
Smart Images

Figure CN114757812B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a rendering method, device, electronic device and computer-readable storage medium. Background Art
[0002] In modern rendering engines, except for mobile platforms and VR platforms, most rendering pipelines use deferred rendering. First, the relevant information of the rendered object is cached in a global buffer. Then, the content stored in the buffer and the lights in the scene are used for lighting calculations to finally generate the entire picture to be rendered. However, in existing technologies, pixel rendering information occupies too much memory, which reduces the efficiency of deferred rendering. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a rendering method, device, electronic device and computer-readable storage medium, which can effectively reduce the memory occupied by pixel rendering information, thereby improving the efficiency of delayed rendering.
[0004] The present application embodiment provides a rendering method, including:
[0005] Get pixel rendering information;
[0006] Get the parity of the pixel coordinates;
[0007] compressing and storing the pixel rendering information according to the parity of the pixel coordinates;
[0008] Delayed rendering is performed according to the compressed and stored pixel rendering information.
[0009] In the above implementation process, different from the prior art, the pixel rendering information is stored according to the parity of the pixel coordinates, and the adjacent pixel rendering information in the picture has similarity. The pixel rendering information is compressed and stored according to the parity of the pixel coordinates, which can effectively reduce the memory occupied by the pixel rendering information, reduce the bandwidth occupied by calling the pixel rendering information during the rendering process, and improve the rendering efficiency.
[0010] Further, the pixel rendering information includes: color information;
[0011] After the step of obtaining pixel rendering information, the method further includes:
[0012] Converting the color information based on a brightness color model;
[0013] The step of compressing and storing the pixel rendering information according to the parity of the pixel coordinates comprises:
[0014] The converted color information is compressed and stored according to the parity of the pixel coordinates.
[0015] In the above implementation process, brightness is high-frequency information and is an important factor in ensuring the quality of the rendered image. Therefore, converting the color information based on the brightness color model can preserve the brightness information to the greatest extent in the converted color information, so that the rendering quality is still maintained after the converted color information is subsequently compressed and stored.
[0016] Furthermore, the pixel rendering information also includes: normal information;
[0017] After the step of obtaining pixel rendering information, the method further includes:
[0018] compressing the normal information;
[0019] The step of compressing and storing the pixel rendering information according to the parity of the pixel coordinates comprises:
[0020] The compressed normal information is compressed and stored according to the parity of the pixel coordinates.
[0021] In the above implementation process, the pixel rendering information includes normal information, and the normal information is compressed after the pixel rendering information is obtained, so that the memory occupied by the pixel rendering information is further reduced, thereby improving the delayed rendering efficiency.
[0022] Furthermore, the step of converting the color information based on the brightness color model includes:
[0023] The coordinates of the color information are converted into coordinates corresponding to the Y'CbCr model.
[0024] In the above implementation process, the Y'CbCr brightness color model can extract the brightness information from the color information. Based on the above implementation, the rendering efficiency can be improved while ensuring the rendering quality.
[0025] Furthermore, the step of compressing the normal information comprises:
[0026] Construct an octahedral coordinate system;
[0027] The coordinate information in the normal information is converted into plane coordinates corresponding to the octahedral coordinate system.
[0028] In the above implementation process, a method for compressing normal information is proposed. Compared with the method of using a spherical coordinate system to represent normal information in the prior art, the use of an octahedral coordinate system can reduce the amount of calculation and the storage space of normal information, thereby improving rendering efficiency.
[0029] Further, the pixel rendering information is stored in a geometry storage area, and the geometry storage area includes: a first geometry storage area;
[0030] The step of compressing and storing the converted color information according to the parity of the pixel coordinates comprises:
[0031] When the parity of the horizontal coordinate and the vertical coordinate of the pixel coordinate is the same, storing the Y'Cb component in the converted color information in the first geometric storage area;
[0032] When the parities of the horizontal coordinate and the vertical coordinate of the pixel coordinate are different, the Y'Cr component in the converted color information is stored in the first geometry storage area.
[0033] In the above implementation process, each pixel will store different pixel rendering information from the pixels adjacent to the cross. However, each pixel will store brightness information. Since brightness information is high-frequency information, if it is restored using surrounding pixels, the error will be relatively large. If each pixel stores brightness information, the entire picture can be restored well.
[0034] Further, the pixel rendering information is stored in a geometry storage area, and the geometry storage area includes: a second geometry storage area and a third geometry storage area;
[0035] The step of compressing and storing the compressed normal information according to the parity of the pixel coordinates comprises:
[0036] When the parities of the horizontal coordinate and the vertical coordinate of the pixel coordinate are different, the horizontal coordinate of the compressed normal information is stored in the second geometric storage area, and the vertical coordinate of the compressed normal information is stored in the third geometric storage area.
[0037] In the above implementation process, each pixel stores different normal information from the pixels adjacent to the cross. Since the pixel rendering information corresponding to the pixels adjacent to the cross is similar, if the geometric storage area corresponding to the current pixel does not have normal information, it can be obtained through the normal information corresponding to the pixels adjacent to the cross.
[0038] Further, the pixel rendering information includes: metalness information and roughness information;
[0039] The pixel rendering information is stored in a geometry storage area, and the geometry storage area includes: a second geometry storage area and a third geometry storage area;
[0040] The step of compressing and storing the pixel rendering information according to the parity of the pixel coordinates comprises:
[0041] When the parity of the horizontal coordinate and the vertical coordinate of the pixel coordinate is the same, the roughness information is stored in the second geometry storage area, and the metalness information is stored in the third geometry storage area.
[0042] In the above implementation process, each pixel stores different metallicity information and roughness information with respect to the pixels adjacent to the cross. Since the pixel rendering information corresponding to the pixels adjacent to the cross is similar, if the geometric storage area corresponding to the current pixel does not have metallicity information and roughness information, it can be obtained through the metallicity information and roughness information corresponding to the pixels adjacent to the cross.
[0043] In a second aspect, an embodiment of the present application provides a rendering device, including:
[0044] A rendering information acquisition module, used to acquire pixel rendering information, wherein the pixel rendering information includes: color information;
[0045] A pixel coordinate acquisition module, used to obtain the parity of pixel coordinates;
[0046] A compression storage module, used for compressing and storing the pixel rendering information according to the parity of the pixel coordinates;
[0047] The delayed rendering module is used to perform delayed rendering according to the compressed and stored pixel rendering information.
[0048] In the above implementation process, different from the prior art, the pixel rendering information is stored according to the parity of the pixel coordinates, and the adjacent pixel rendering information in the picture has similarity. The pixel rendering information is compressed and stored according to the parity of the pixel coordinates, which can effectively reduce the memory occupied by the pixel rendering information, reduce the bandwidth occupied by calling the pixel rendering information during the rendering process, and improve the rendering efficiency.
[0049] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in any one of the first aspects when executing the computer program.
[0050] Other features and advantages disclosed in the present application will be described in the following description, or some features and advantages can be inferred or determined without doubt from the description, or can be learned by implementing the above-mentioned technology disclosed in the present application.
[0051] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0053] Figure 1 A schematic diagram of a flow chart of a rendering method provided in an embodiment of the present application;
[0054] Figure 2 A schematic diagram of the structure of a rendering device provided in an embodiment of the present application;
[0055] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0056] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0057] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0058] Example 1
[0059] See also Figure 1 , an embodiment of the present application provides a rendering method, comprising:
[0060] S1: Get pixel rendering information;
[0061] S2: Get the parity of the pixel coordinates;
[0062] The parity of pixel coordinates refers to the parity of the horizontal and vertical coordinates of the pixel coordinates.
[0063] S3: compress and store pixel rendering information according to the parity of pixel coordinates;
[0064] In the prior art, each pixel coordinate has its corresponding pixel rendering information, and compressed storage refers to the parity of the values of the horizontal coordinate and the vertical coordinate of the pixel coordinate.
[0065] S4: Perform delayed rendering according to the compressed and stored pixel rendering information.
[0066] In the above embodiment, different from the prior art, the pixel rendering information is stored according to the parity of the pixel coordinates, and the adjacent pixel rendering information in the picture has similarity. The pixel rendering information is compressed and stored according to the parity of the pixel coordinates, which can effectively reduce the memory occupied by the pixel rendering information, reduce the bandwidth occupied by calling the pixel rendering information during the rendering process, and improve the rendering efficiency.
[0067] In a possible implementation, the rendering information includes: color information;
[0068] After step S1, it also includes:
[0069] Convert color information based on brightness color model;
[0070] S3 includes: compressing and storing the converted color information according to the parity of the pixel coordinates.
[0071] In the above implementation process, brightness is high-frequency information and is an important factor in ensuring the quality of the rendered image. Therefore, converting the color information based on the brightness color model can preserve the brightness information to the greatest extent in the converted color information, so that the rendering quality is still maintained after the converted color information is subsequently compressed and stored.
[0072] The embodiment of the present application provides a method for converting color information based on a brightness color model, including:
[0073] Convert the color information coordinates to the coordinates corresponding to the Y'CbCr model.
[0074] In a possible implementation, the Y'UV color model may also be used to represent color information.
[0075] In the above implementation process, the existing technology uses the RGB color model to represent color information, while the Y'CbCr brightness color model can extract brightness information from color information. Based on the above implementation, the rendering efficiency can be improved while ensuring the rendering quality.
[0076] Pixel rendering information is usually stored in the geometry storage area. The rendering process completes deferred rendering by calling the pixel rendering information in the geometry storage area (G-Buffer). The collection storage area usually includes the first geometry storage area (GBuffer.RG), the second geometry storage area (GBuffer.B) and the third geometry storage area (GBuffer.A).
[0077] Based on the method of using the Y'CbCr model to represent color information, the embodiment of the present application also provides a method for compressing and storing the converted color information, including:
[0078] When the parity of the horizontal coordinate and the vertical coordinate of the pixel coordinate is the same, the Y'Cb component in the converted color information is stored in the first geometric storage area;
[0079] When the parities of the horizontal coordinate and the vertical coordinate of the pixel coordinate are different, the Y'Cr component in the converted color information is stored in the first geometry storage area.
[0080] Wherein, Y' represents brightness information.
[0081] In the above implementation process, each pixel will store different pixel rendering information from the pixels adjacent to the cross. However, each pixel will store brightness information. Since brightness information is high-frequency information, if it is restored using surrounding pixels, the error will be relatively large. If each pixel stores brightness information, the entire picture can be restored well.
[0082] In a possible implementation, the pixel rendering information further includes: normal information;
[0083] After step S1, the process further includes: compressing normal information;
[0084] S3 includes: storing the compressed normal information according to the parity of the pixel coordinates.
[0085] In the above implementation process, the pixel rendering information includes normal information, and the normal information is compressed after the pixel rendering information is obtained, so that the memory occupied by the pixel rendering information is further reduced, thereby improving the delayed rendering efficiency.
[0086] In the prior art, a spherical coordinate system is usually used to represent normal information. Using coordinates corresponding to the spherical coordinate system to represent normal information requires 24 bits. Based on this, the present application proposes a method for compressing normal information, which includes:
[0087] Construct an octahedral coordinate system;
[0088] Exemplarily, the expression corresponding to the octahedron is |X|+|Y|+|Z|=1
[0089] The coordinate information in the normal information is converted into the plane coordinates corresponding to the octahedral coordinate system.
[0090] In the above embodiment, the coordinates in the plane coordinate system occupy 16 bits, and each coordinate occupies 8 bits.
[0091] In the above embodiment, a method for compressing normal information is proposed. Compared with the method of using a spherical coordinate system to represent normal information in the prior art, using an octahedral coordinate system can reduce the amount of calculation and the storage space of normal information, thereby improving rendering efficiency.
[0092] Based on the above-mentioned normal information compression method, the embodiment of the present application proposes a method for compressing and storing compressed normal information, including:
[0093] When the parities of the abscissa and the ordinate of the pixel coordinates are different, the abscissa of the compressed normal information is stored in the second geometry storage area, and the ordinate of the compressed normal information is stored in the third geometry storage area.
[0094] In the above embodiment, each pixel stores different normal information from the pixels adjacent to the cross. Since the pixel rendering information corresponding to the pixels adjacent to the cross is similar, if the geometric storage area corresponding to the current pixel has no normal information, it can be obtained through the normal information corresponding to the pixels adjacent to the cross.
[0095] In a possible implementation, the pixel rendering information includes: metalness information and roughness information;
[0096] Based on this, S3 includes: when the parity of the horizontal coordinate and the vertical coordinate of the pixel coordinate is the same, storing the roughness information in the second geometric storage area and storing the metalness information in the third geometric storage area.
[0097] In the above embodiment, each pixel stores different metallicity information and roughness information from the pixels adjacent to the cross. Since the pixel rendering information corresponding to the pixels adjacent to the cross is similar, if the geometric storage area corresponding to the current pixel does not have metallicity information and roughness information, it can be obtained through the metallicity information and roughness information corresponding to the pixels adjacent to the cross.
[0098] Example 2
[0099] See also Figure 2 , an embodiment of the present application provides a rendering device, including:
[0100] The rendering information acquisition module 1 is used to acquire pixel rendering information, and the pixel rendering information includes: color information;
[0101] A pixel coordinate acquisition module 2, used to acquire the parity of the pixel coordinates;
[0102] A compression storage module 3, used for compressing and storing pixel rendering information according to the parity of pixel coordinates;
[0103] The delayed rendering module 4 is used to perform delayed rendering according to the compressed and stored pixel rendering information.
[0104] In the above implementation process, different from the prior art, the pixel rendering information is stored according to the parity of the pixel coordinates, and the adjacent pixel rendering information in the picture has similarity. The pixel rendering information is compressed and stored according to the parity of the pixel coordinates, which can effectively reduce the memory occupied by the pixel rendering information, reduce the bandwidth occupied by calling the pixel rendering information during the rendering process, and improve the rendering efficiency.
[0105] In a possible implementation, the pixel rendering information includes: color information; the device also includes: a conversion module for converting the color information based on a brightness color model, and the compression storage module is further used to compress and store the converted color information according to the parity of the pixel coordinates.
[0106] In a possible implementation, the pixel rendering information includes normal information; the device further includes a compression module for compressing the normal information; and the compression storage module is further used to store the compressed normal information according to the parity of the pixel coordinates.
[0107] In a possible implementation manner, the conversion module is further configured to convert the coordinates of the color information into coordinates corresponding to the Y'CbCr model.
[0108] In a possible implementation, the compression module is also used to construct an octahedral coordinate system;
[0109] The coordinate information in the normal information is converted into the plane coordinates corresponding to the octahedral coordinate system.
[0110] In a possible implementation, pixel rendering information is stored in a geometry storage area, and the geometry storage area includes: a first geometry storage area; the compression storage module is also used to store the Y'Cb component in the converted color information in the first geometry storage area when the parity of the horizontal coordinate and the vertical coordinate of the pixel coordinate are the same; when the parity of the horizontal coordinate and the vertical coordinate of the pixel coordinate are different, store the Y'Cr component in the converted color information in the first geometry storage area.
[0111] In one possible implementation, pixel rendering information is stored in a geometry storage area, which includes: a second geometry storage area and a third geometry storage area; the compression storage module is also used to store the horizontal coordinate of the compressed normal information in the second geometry storage area and the vertical coordinate of the compressed normal information in the third geometry storage area when the horizontal coordinate and the vertical coordinate of the pixel coordinate have different parities.
[0112] In one possible implementation, the pixel rendering information includes: metalness information and roughness information; the pixel rendering information is stored in a geometry storage area, and the geometry storage area includes: a second geometry storage area and a third geometry storage area; the compression storage module is also used to store the roughness information in the second geometry storage area and the metalness information in the third geometry storage area when the parity of the horizontal coordinate and the vertical coordinate of the pixel coordinate are the same.
[0113] This application also provides an electronic device, see Figure 3 , Figure 3 A block diagram of an electronic device provided in an embodiment of the present application. The electronic device may include a processor 31, a communication interface 32, a memory 33, and at least one communication bus 34. The communication bus 34 is used to realize direct connection and communication between these components. The communication interface 32 of the electronic device in the embodiment of the present application is used to communicate signaling or data with other node devices. The processor 31 may be an integrated circuit chip with signal processing capabilities.
[0114] The processor 31 mentioned above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or the processor 31 can also be any conventional processor, etc.
[0115] The memory 33 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), etc. The memory 33 stores computer-readable instructions. When the computer-readable instructions are executed by the processor 31, the electronic device may execute the various steps involved in the above method embodiment.
[0116] Optionally, the electronic device may further include a storage controller and an input / output unit.
[0117] The memory 33, storage controller, processor 31, peripheral interface, input and output unit components are directly or indirectly electrically connected to each other to achieve data transmission or interaction. For example, these components can be electrically connected to each other via one or more communication buses 34. The processor 31 is used to execute executable modules stored in the memory 33, such as software function modules or computer programs included in the electronic device.
[0118] The input and output unit is used to provide users with the task creation and to create an optional time period or preset execution time for the task to enable interaction between the user and the server. The input and output unit can be, but is not limited to, a mouse and a keyboard.
[0119] Understandably, Figure 3 The structure shown is for illustration only. The electronic device may also include Figure 3 More or fewer components as shown, or with Figure 3 Different configurations are shown. Figure 3 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0120] An embodiment of the present application further provides a computer-readable storage medium having instructions stored thereon. When the instructions are run on a computer, the computer program is executed by a processor to implement the method described in the method embodiment. To avoid repetition, it will not be described again here.
[0121] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0122] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0123] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. According to this understanding, the technical solution of the present application can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., and other media that can store program codes.
[0124] The above description is only an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0125] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0126] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
Claims
1. A rendering method, It is characterized in that include: Obtain pixel rendering information, the pixel rendering information including: color information and normal information; compressing the normal information; Converting the color information based on a brightness color model; Get the parity of the pixel coordinates; Compressing and storing the pixel rendering information according to the parity of the pixel coordinates specifically includes: compressing and storing the converted color information according to the parity of the pixel coordinates; compressing and storing the compressed normal information according to the parity of the pixel coordinates; Performing delayed rendering according to the compressed and stored pixel rendering information; The step of converting the color information based on the brightness color model comprises: Convert the coordinates of the color information into coordinates corresponding to the Y'CbCr model; The pixel rendering information is stored in a geometry storage area, and the geometry storage area includes: a first geometry storage area, a second geometry storage area, and a third geometry storage area; When the parity of the horizontal coordinate and the vertical coordinate of the pixel coordinate is the same, storing the Y'Cb component in the converted color information in the first geometric storage area; When the parity of the horizontal coordinate and the vertical coordinate of the pixel coordinate is different, storing the Y'Cr component in the converted color information in the first geometric storage area; When the parities of the horizontal coordinate and the vertical coordinate of the pixel coordinate are different, the horizontal coordinate of the compressed normal information is stored in the second geometric storage area, and the vertical coordinate of the compressed normal information is stored in the third geometric storage area.
2. The rendering method according to claim 1, It is characterized in that The step of compressing the normal information comprises: Construct an octahedral coordinate system; The coordinate information in the normal information is converted into plane coordinates corresponding to the octahedral coordinate system.
3. The rendering method according to claim 1, It is characterized in that The pixel rendering information includes: metalness information and roughness information; The pixel rendering information is stored in a geometry storage area; The step of compressing and storing the pixel rendering information according to the parity of the pixel coordinates comprises: When the parity of the horizontal coordinate and the vertical coordinate of the pixel coordinate is the same, the roughness information is stored in the second geometry storage area, and the metalness information is stored in the third geometry storage area.
4. A rendering device, It is characterized in that include: A rendering information acquisition module, used to acquire pixel rendering information, wherein the pixel rendering information includes: color information and normal information; A pixel coordinate acquisition module, used to obtain the parity of pixel coordinates; A compression storage module, used for compressing and storing the pixel rendering information according to the parity of the pixel coordinates; A delayed rendering module, used for performing delayed rendering according to the compressed and stored pixel rendering information; The device further comprises: a conversion module for converting color information based on a brightness color model, and a compression storage module for compressing and storing the converted color information according to the parity of pixel coordinates; The conversion module is also used to convert the coordinates of the color information into coordinates corresponding to the Y'CbCr model; The pixel rendering information is stored in a geometry storage area, which includes: a first geometry storage area, a second geometry storage area, and a third geometry storage area; the compression storage module is further used to store the Y'Cb component in the converted color information in the first geometry storage area when the parity of the horizontal coordinate and the vertical coordinate of the pixel coordinate is the same; when the parity of the horizontal coordinate and the vertical coordinate of the pixel coordinate is different, store the Y'Cr component in the converted color information in the first geometry storage area; The compression storage module is also used to: compress the normal information; compress and store the compressed normal information according to the parity of the pixel coordinates; when the parity of the horizontal coordinate and the vertical coordinate of the pixel coordinates are different, store the horizontal coordinate of the compressed normal information in the second geometric storage area, and store the vertical coordinate of the compressed normal information in the third geometric storage area.
5. An electronic device, It is characterized in that include: A compressed memory, a processor, and a computer program compressed and stored in the compressed memory and executable on the processor, wherein the processor implements the steps of the rendering method according to any one of claims 1 to 3 when executing the computer program.
Citation Information
Patent Citations
Variable precision encoding and decoding method suitable for deferred shading
CN108109193A
Image format conversion method and device of graphics processor, equipment and storage medium
CN114040246A
Sub-pixel rendering method for RGB-Delta arrangement
CN114203089A