Rendering operation execution method and device, storage medium and electronic equipment
By dynamically adjusting the shading rate configuration in the rendering operation, and using the texture offset value after the deformation sampling operation, the problem that the fixed shading rate configuration cannot balance visual quality and performance is solved, and the execution efficiency of the rendering operation is improved.
Patent Information
- Application Number
- CN202310744587.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-20
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2043-06-20
AI Technical Summary
The fixed shading rate configuration in existing rendering operations cannot achieve the optimal balance between visual quality loss and performance gain, resulting in low performance efficiency of rendering operations.
By obtaining the texture offset value after the deformation sampling operation, dynamically adjusting the shading rate configuration to optimize the use of the number of pixels in the rendering operation, and automatically adjusting the shading rate configuration of the rendering object.
It improves the execution efficiency of rendering operations, balances visual quality loss and performance gain, and improves the overall performance of rendering operations.
Smart Images

Figure CN119169119A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular to a method, device, storage medium and electronic device for executing a rendering operation. Background Art
[0002] In the execution scenario of the rendering operation, a fixed shading rate configuration is usually used to render different materials, but the fixed shading rate configuration method cannot achieve the best balance between visual quality loss and performance gain, which leads to the problem of low execution efficiency of the rendering operation. Therefore, there is a problem of low execution efficiency of the rendering operation.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present application provide a method, device, storage medium and electronic device for executing a rendering operation, so as to at least solve the technical problem of low execution efficiency of the rendering operation.
[0005] According to one aspect of an embodiment of the present application, a method for executing a rendering operation is provided, including: executing a rendering operation on a target object according to a first shading rate configuration, wherein the first shading rate configuration is used to indicate that the number of pixels applied when executing the rendering operation is a first number; when a deformation sampling operation performed on the target object is obtained, obtaining a texture offset value corresponding to the deformation sampling operation, wherein the texture offset value is used to indicate a texture change of the target object caused by the deformation sampling operation; adjusting the first shading rate configuration using the texture offset value to obtain a second shading rate configuration, and executing the rendering operation on the target object according to the second shading rate configuration, wherein the second shading rate configuration is used to indicate that the number of pixels applied when executing the rendering operation is a second number.
[0006] According to another aspect of an embodiment of the present application, a device for executing a rendering operation is also provided, including: a first rendering unit, used to perform a rendering operation on a target object according to a first shading rate configuration, wherein the first shading rate configuration is used to indicate that the number of pixels applied when performing the rendering operation is a first number; an offset unit, used to obtain a texture offset value corresponding to the deformation sampling operation when a deformation sampling operation performed on the target object is obtained, wherein the texture offset value is used to indicate the texture change of the target object caused by the deformation sampling operation; a second rendering unit, used to adjust the first shading rate configuration using the texture offset value to obtain a second shading rate configuration, and perform the rendering operation on the target object according to the second shading rate configuration, wherein the second shading rate configuration is used to indicate that the number of pixels applied when performing the rendering operation is a second number.
[0007] As an optional scheme, the above-mentioned second rendering unit includes: a first adjustment module, used to use the above-mentioned texture offset value to adjust the above-mentioned first quantity to obtain the above-mentioned second quantity; or, a second adjustment module, used to use the above-mentioned texture offset value to adjust the first shading rate block matching the above-mentioned first shading rate configuration to obtain the second shading rate block, wherein the above-mentioned first shading rate block includes at least one first pixel quantity, the above-mentioned at least one first pixel quantity includes the above-mentioned first quantity, the above-mentioned second shading rate block includes at least one second pixel quantity, and the above-mentioned at least one second pixel quantity includes the above-mentioned second quantity; a first determination module, used to determine the above-mentioned second quantity from the above-mentioned at least one pixel quantity.
[0008] As an optional solution, the above-mentioned device also includes: a second determination module, used to determine the preferred direction of the shading rate of the above-mentioned target object based on the texture details corresponding to the above-mentioned target object before determining the above-mentioned second number from the above-mentioned at least one pixel number, wherein the above-mentioned preferred direction of the shading rate is used to indicate the configuration tendency of the above-mentioned texture details for different pixel numbers; the above-mentioned first determination module includes: a first determination submodule, used to determine the above-mentioned second number matching the above-mentioned preferred direction of the shading rate from the above-mentioned at least one pixel number.
[0009] As an optional solution, the above-mentioned device also includes: a second determination submodule, which is used to determine the above-mentioned first number matching the above-mentioned preferred direction of the shading rate from the above-mentioned at least one first pixel number during the process of performing the rendering operation on the target object according to the above-mentioned first shading rate configuration.
[0010] As an optional scheme, the above-mentioned second determination module includes: a first convolution submodule, used to convolve the material texture brightness image corresponding to the above-mentioned target object in at least two directions to obtain different image brightness gradient maps in the above-mentioned at least two directions; a second statistical submodule, used to count the number of target pixels that meet the detail-rich conditions on the above-mentioned different image brightness gradient maps, and determine the detail index value of the above-mentioned target object in the above-mentioned at least two directions, wherein the above-mentioned detail index value is positively correlated with the above-mentioned target pixel number, and the above-mentioned detail index value is used to indicate the degree of texture detail of the above-mentioned target object in different directions; a third determination submodule, used to determine the target direction with the largest detail index value in the above-mentioned at least two directions as the preferred direction of the above-mentioned shading rate.
[0011] As an optional scheme, the above-mentioned device also includes: a third determination module, which is used to determine the overall index value of the above-mentioned target object according to the texture details corresponding to the above-mentioned target object before performing the rendering operation on the target object according to the first shading rate configuration, wherein the above-mentioned overall index value is used to represent the overall texture detail level of the above-mentioned target object; a fourth determination module, which is used to determine the above-mentioned first quantity that matches the above-mentioned overall index value from multiple candidate quantities before performing the rendering operation on the target object according to the first shading rate configuration; or, determine the above-mentioned first shading rate block that matches the above-mentioned overall index value from multiple candidate shading rate blocks.
[0012] As an optional scheme, the above-mentioned third determination module includes: a second convolution submodule, used to convolve the material texture brightness image corresponding to the above-mentioned target object to obtain a target image brightness gradient map; a second statistical submodule, used to count the number of all target pixels on the above-mentioned target image brightness gradient map that meet the detail-rich conditions, and determine the above-mentioned overall index value, wherein the above-mentioned overall index value is positively correlated with the above-mentioned total number of target pixels.
[0013] As an optional solution, the above-mentioned offset unit includes: a first acquisition module, which is used to obtain a first offset value corresponding to the above-mentioned enlargement sampling operation when the above-mentioned deformation sampling operation is an enlargement sampling operation; or, when the above-mentioned deformation sampling operation is a reduction sampling operation, obtain a second offset value corresponding to the above-mentioned reduction sampling operation, wherein the above-mentioned first offset value is greater than the above-mentioned second offset value; the above-mentioned first adjustment module includes: a first summation submodule, which is used to sum the above-mentioned first offset value and the above-mentioned first number to obtain a first summation result, and determine the above-mentioned first summation result as the above-mentioned second number; the above-mentioned second adjustment module includes: a second summation submodule, which is used to sum the above-mentioned first offset value and the above-mentioned first shading rate file to obtain a second summation result, and use the above-mentioned second summation result to upgrade the above-mentioned first shading rate file to the above-mentioned second shading rate file, wherein the level of the shading rate file is positively correlated with the number of pixels applied when performing the above-mentioned rendering operation.
[0014] As an optional solution, the above-mentioned device also includes: a second acquisition module, which is used to obtain the projected pixel area of the spherical bounding box of the above-mentioned target object after being projected onto the display area, and the hemispherical area of the above-mentioned spherical bounding box, before obtaining the texture offset value corresponding to the above-mentioned deformation sampling operation; a division module, which is used to divide the above-mentioned projected pixel area and the above-mentioned hemispherical area before obtaining the texture offset value corresponding to the above-mentioned deformation sampling operation, so as to obtain the actual texture area required when performing the above-mentioned rendering operation on the above-mentioned target object; a fifth determination module, which is used to determine that the above-mentioned deformation sampling operation is an enlargement sampling operation before obtaining the texture offset value corresponding to the above-mentioned deformation sampling operation, if the standard texture area of the above-mentioned target object is obtained and the above-mentioned actual texture area is greater than the above-mentioned standard texture area; or, if the above-mentioned standard texture area is obtained and the above-mentioned actual texture area is less than the above-mentioned standard texture area, determine that the above-mentioned deformation sampling operation is a reduction sampling operation.
[0015] As an optional scheme, the above-mentioned offset unit includes at least one of the following: a third acquisition module, used to obtain the above-mentioned texture offset value when the above-mentioned deformation sampling operation performed on the above-mentioned target object is obtained and the above-mentioned target object is located in the first target list, wherein the objects in the above-mentioned first target list allow adaptive adjustment of the corresponding shading rate configuration; a fourth acquisition module, used to obtain the above-mentioned texture offset value when the above-mentioned deformation sampling operation performed on the above-mentioned target object is obtained and the above-mentioned target object is not located in the second target list, wherein the objects in the above-mentioned second target list are prohibited from adaptive adjustment of the corresponding shading rate configuration.
[0016] According to another aspect of the embodiments of the present application, a computer program product or a computer program is provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the execution method of the above rendering operation.
[0017] According to another aspect of an embodiment of the present application, there is also provided an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the method for executing the rendering operation through the computer program.
[0018] In an embodiment of the present application, a rendering operation is performed on a target object according to a first shading rate configuration, wherein the first shading rate configuration is used to indicate that the number of pixels applied when performing the rendering operation is a first number; when a deformation sampling operation performed on the target object is obtained, a texture offset value corresponding to the deformation sampling operation is obtained, wherein the texture offset value is used to indicate a texture change of the target object caused by the deformation sampling operation; the first shading rate configuration is adjusted using the texture offset value to obtain a second shading rate configuration, and the rendering operation is performed on the target object according to the second shading rate configuration, wherein the second shading rate configuration is used to indicate that the number of pixels applied when performing the rendering operation is a second number. First, the basic shading rate configuration (first shading rate configuration) of the rendered object (target object) is obtained through the texture detail level corresponding to the target object, and then when the target object performs a deformation operation, the texture change of the target object caused by the deformation sampling operation is obtained, and the texture change is used as a texture offset value to adjust the above basic shading rate configuration, so as to obtain a new shading rate configuration (second shading rate configuration) that balances the visual quality loss and the performance gain, thereby achieving the purpose of automatically and dynamically adjusting the shading rate configuration of the rendered object, thereby realizing the technical effect of improving the execution efficiency of the rendering operation, and thus solving the technical problem of low execution efficiency of the rendering operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0020] Figure 1 is a schematic diagram of an application environment of an optional method for executing a rendering operation according to an embodiment of the present application;
[0021] Figure 2 is a schematic diagram of a process of an optional method for executing a rendering operation according to an embodiment of the present application;
[0022] Figure 3 is a schematic diagram of an optional method for executing a rendering operation according to an embodiment of the present application;
[0023] Figure 4 is a schematic diagram of another optional method for executing a rendering operation according to an embodiment of the present application;
[0024] Figure 5 is a schematic diagram of another optional method for executing a rendering operation according to an embodiment of the present application;
[0025] Figure 6 is a schematic diagram of another optional method for executing a rendering operation according to an embodiment of the present application;
[0026] Figure 7 is a schematic diagram of another optional method for executing a rendering operation according to an embodiment of the present application;
[0027] Figure 8 is a schematic diagram of another optional method for executing a rendering operation according to an embodiment of the present application;
[0028] Fig. 9 is a schematic diagram of another optional method for executing a rendering operation according to an embodiment of the present application;
[0029] Fig.10 is a schematic diagram of another optional method for executing a rendering operation according to an embodiment of the present application;
[0030] Fig.11 is a schematic diagram of another optional method for executing a rendering operation according to an embodiment of the present application;
[0031] Fig.12 is a schematic diagram of another optional method for executing a rendering operation according to an embodiment of the present application;
[0032] Fig.13 is a schematic diagram of an optional device for executing a rendering operation according to an embodiment of the present application;
[0033] Fig.14 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0034] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0035] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0036] According to one aspect of an embodiment of the present application, a method for executing a rendering operation is provided. Optionally, as an optional implementation, the method for executing the rendering operation may be, but is not limited to, applied to: Figure 1 In the environment shown, the environment may include, but is not limited to, a user device 102 and a server 112 . The user device 102 may include, but is not limited to, a display 104 , a processor 106 , and a memory 108 . The server 112 includes a database 114 and a processing engine 116 .
[0037] The specific process can be as follows:
[0038] Step S102, the user device 102 displays a game screen of performing a rendering operation on a target object according to a first shading rate configuration on the display 104 through the processor 106, and the user device 102 performs a deformation sampling operation on the target object;
[0039] Steps S104-S106, sending the operation information of the deformation sampling operation to the server 112 via the network 110;
[0040] Steps S108-S110, the server 112 obtains the texture offset value corresponding to (the operation information of) the deformation sampling operation through the processing engine 116, and further uses the texture offset value to adjust the first shading rate configuration to obtain a second shading rate configuration;
[0041] Steps S112-S116, send the second shading rate configuration to the user device 102 via the network 110, the user device 102 displays the game screen of the target object rendering operation according to the second shading rate configuration on the display 104 through the processor 106, and stores the above second shading rate configuration in the memory 108.
[0042] remove Figure 1In addition to the examples shown, the above steps can be completed independently by the user device or the server, or by the user device and the server in collaboration, such as the user device 102 executing the above steps S108-S110, thereby reducing the processing pressure of the server 112. The user device 102 includes but is not limited to handheld devices (such as mobile phones), laptops, tablet computers, desktop computers, vehicle-mounted devices, smart TVs, etc., and the present application does not limit the specific implementation of the user device 102. The server 112 can be a single server or a server cluster consisting of multiple servers, or a cloud server.
[0043] Optionally, as an optional implementation, as Figure 2 As shown, the method for executing the rendering operation can be executed by an electronic device, such as Figure 1 The user device or server shown in the figure comprises:
[0044] S202, performing a rendering operation on a target object according to a first shading rate configuration, wherein the first shading rate configuration is used to indicate that the number of pixels applied when performing the rendering operation is a first number;
[0045] S204, when a deformation sampling operation performed on the target object is obtained, a texture offset value corresponding to the deformation sampling operation is obtained, wherein the texture offset value is used to represent a texture change of the target object caused by the deformation sampling operation;
[0046] S206, adjusting the first shading rate configuration using the texture offset value to obtain a second shading rate configuration, and performing a rendering operation on the target object according to the second shading rate configuration, wherein the second shading rate configuration is used to indicate that the number of pixels applied when performing the rendering operation is a second number.
[0047] Optionally, in this embodiment, the execution method of the above-mentioned rendering operation can be but is not limited to being applied to the screen rendering scene of a virtual game. In the virtual game, whether it is background elements or prop elements, they all need to be rendered as objects to be rendered to perform rendering operations, and the execution of the rendering operation needs to be configured according to the corresponding shading rate. A too high shading rate configuration (a too high shading rate configuration corresponds to a fewer number of rendering operation executions) will improve performance gain, but there will be some loss in visual quality. Conversely, a too low shading rate configuration (a too low shading rate configuration corresponds to a more number of rendering operation executions) will improve visual quality, but there will be some loss in performance gain. This embodiment aims to maintain a balance between visual quality loss and performance gain, thereby improving the execution efficiency of rendering operations.
[0048] Optionally, in this embodiment, the shading rate may be, but is not limited to, the number of pixel shader operations called for each pixel when the graphics card renders an image, wherein a higher shading rate may improve the accuracy of the rendered image, but has higher requirements on the graphics card, resulting in performance loss, while a lower shading rate may improve performance at the expense of image quality. The color rate configuration may be, but is not limited to, used to represent the number of pixels applied when performing a rendering operation, and the number of pixels applied when performing a rendering operation may be, but is not limited to, in direct proportion to the efficiency of performing the rendering operation.
[0049] To further illustrate, it is optionally assumed that 8 pixels are distributed on the target object 302 to be rendered, and then according to Figure 3 The first shading rate configuration 304 shown in FIG. 1 applies 1 (1×1) pixels to the target object 302 when performing a rendering operation. Therefore, according to the first shading rate configuration 304, 8 rendering operations need to be performed on 8 pixels distributed on the target object 302. Figure 3 Scenario shown, continue as Figure 4 The second shading rate configuration 402 shown applies 4 (2X2) pixels when performing a rendering operation on the target object 302, and thus according to the first shading rate configuration 304, only two rendering operations need to be performed on the eight pixels distributed on the target object 302, and the execution efficiency of two rendering operations is naturally higher than the execution efficiency of eight rendering operations.
[0050] From this, it can be seen that the larger the number of pixels applied when performing a rendering operation, the higher the efficiency of the rendering operation, the greater the performance gain, but there will be some loss in visual quality; conversely, the smaller the number of pixels applied when performing a rendering operation, the lower the efficiency of the rendering operation, the higher the visual quality, but there will be some loss in performance gain, that is, the number of pixels applied when performing a rendering operation and the efficiency of performing the rendering operation can be, but is not limited to, in direct proportion.
[0051] Optionally, in this embodiment, the shading rate configuration may be, but is not limited to, divided into a variable shading rate configuration and a fixed shading rate configuration, wherein the variable shading rate configuration may be, but is not limited to, understood as a shading rate configuration that allows dynamic changes, such as the first shading rate configuration of the target object is adjusted to the second shading rate configuration according to the change in the texture offset value corresponding to the deformation sampling operation when the deformation sampling operation is obtained, and the shading rate configuration of the target object can be understood as a variable shading rate configuration. The fixed shading rate configuration may be, but is not limited to, understood as a shading rate configuration that prohibits dynamic changes but allows static adjustments, such as assuming that the shading rate configuration of the whitelist object is a fixed shading rate configuration, and even when the deformation sampling operation is obtained, the shading rate configuration of the whitelist object will be prohibited from being dynamically adjusted, but the shading rate configuration of the whitelist object can be statically adjusted, such as manually adjusting the shading rate configuration of the whitelist object in the background.
[0052] Optionally, in this embodiment, the first number is negatively correlated with the texture detail level corresponding to the target object. For a render (target object) with a high texture detail level, too many pixels are applied in a single rendering operation, which will cause obvious image quality (visual quality) loss, while for a render with a low texture detail level, increasing the number of pixels applied in a single rendering operation is not sensitive to the image quality. In other words, the texture detail level can usually approximately reflect the sensitivity of the render to the number of pixels, and then the first number is set to be negatively correlated with the texture detail level corresponding to the target object, so that a render with a high sensitivity to the number of pixels is configured with a smaller number of pixels, or more rendering operations are performed, while a render with a low sensitivity to the number of pixels is configured with a larger number of pixels, or fewer rendering operations are performed, so as to maintain a balance between visual quality loss and performance gain.
[0053] To further illustrate, optionally, the first shading rate configuration may be understood as, but not limited to, a basic shading rate configuration calculated based on the texture detail level corresponding to the target object, such as Figure 5 The similarity between each pixel (one grid represents one pixel) on the target object 502 shown, the lower the similarity, the more detailed the texture corresponding to the target object is, that is, the higher the texture detail level of the target object is; conversely, the higher the similarity, the coarser the texture corresponding to the target object is, that is, the lower the texture detail level of the target object is.
[0054] It should be noted that the basic shading rate configuration (first shading rate configuration) of the rendered object (target object) is first obtained through the texture detail level corresponding to the target object, and then when the target object performs a deformation operation, the texture change of the target object caused by the deformation sampling operation is obtained, and the texture change is used as a texture offset value to adjust the above-mentioned basic shading rate configuration, so as to obtain a new shading rate configuration (second shading rate configuration) that balances the visual quality loss and performance gain, thereby achieving the purpose of automatically and dynamically adjusting the shading rate configuration of the rendered object, thereby realizing the technical effect of improving the execution efficiency of the rendering operation.
[0055] To further illustrate, the optional Figure 6 As shown, a game screen 1 showing a rendering operation performed on a target object 602 according to a first shading rate configuration 604 is displayed, wherein the first shading rate configuration 604 is used to indicate that the number of pixels applied when performing a (single) rendering operation is "1X1" (a first number), and the first number is positively correlated with the texture detail level corresponding to the target object 602; when a deformation sampling operation 606 performed on the target object 602 is obtained, a texture offset value corresponding to the deformation sampling operation 606 is obtained, wherein the texture offset value is used to indicate a texture change of the target object 602 caused by the deformation sampling operation 606; the first shading rate configuration 604 is adjusted using the texture offset value The second shading rate configuration 608 is obtained, and the game screen 2 in which the rendering operation is performed on the target object 602 according to the second shading rate configuration 608 is displayed, wherein the second shading rate configuration 608 is used to indicate that the number of pixels applied when performing a (single) rendering operation is "2X2" (the second number), and then assuming that there are 8 pixels distributed on the target object 302, and then the first shading rate configuration 604 configured with a "1X1" pixel number will perform 8 rendering operations, and the second shading rate configuration 608 configured with a "2X2" pixel number only needs to perform 2 rendering operations, which is not only more efficient, but also has little impact on the picture quality, and balances the visual quality loss and performance gain.
[0056] Through the embodiments provided by the present application, a rendering operation is performed on a target object according to a first shading rate configuration, wherein the first shading rate configuration is used to indicate that the number of pixels applied when performing the rendering operation is a first number, and the first number is negatively correlated with the degree of texture detail corresponding to the target object; when a deformation sampling operation performed on the target object is obtained, a texture offset value corresponding to the deformation sampling operation is obtained, wherein the texture offset value is used to indicate the texture change of the target object caused by the deformation sampling operation; the first shading rate configuration is adjusted using the texture offset value to obtain a second shading rate configuration, and a rendering operation is performed on the target object according to the second shading rate configuration, wherein the second shading rate configuration is used to indicate that the number of pixels applied when performing the rendering operation is a second number. First, the basic shading rate configuration (first shading rate configuration) of the rendered object (target object) is obtained through the texture detail level corresponding to the target object. Then, when the target object performs a deformation operation, the texture change of the target object caused by the deformation sampling operation is obtained, and the texture change is used as a texture offset value to adjust the above basic shading rate configuration, so as to obtain a new shading rate configuration (second shading rate configuration) that balances visual quality loss and performance gain, thereby achieving the purpose of automatically and dynamically adjusting the shading rate configuration of the rendered object, thereby realizing the technical effect of improving the execution efficiency of the rendering operation.
[0057] As an optional solution, the first shading rate configuration is adjusted using the texture offset value to obtain a second shading rate configuration, including:
[0058] Using the texture offset value to adjust the first quantity to obtain a second quantity; or,
[0059] S1-1, adjusting a first shading rate block matched with a first shading rate configuration using a texture offset value to obtain a second shading rate block, wherein the first shading rate block includes at least one first pixel quantity, the at least one first pixel quantity includes a first quantity, and the second shading rate block includes at least one second pixel quantity, the at least one second pixel quantity includes a second quantity;
[0060] S1-2, determining a second number from at least one pixel number.
[0061] Optionally, in this embodiment, adjusting the first shading rate configuration by using the texture offset value may be understood, but not limited to, as adjusting the first quantity by using the texture offset value to obtain the second quantity, such as Figure 7 As shown, the number of pixels of the target object 702 before adjustment is less than the number of pixels of the target object 704 after adjustment to obtain a second shading rate block.
[0062] Optionally, in the present embodiment, adjusting the first shading rate configuration using the texture offset value can be understood, but not limited to, as adjusting the first shading rate block that matches the first shading rate configuration using the texture offset value, and different shading rate blocks can, but not limited to, correspond to different numbers of pixels, such as block 1 corresponds to a number of pixels of 1X1, block 2 corresponds to a number of pixels of 2X2, block 3 corresponds to a number of pixels of 2X4, etc., and further assuming that the first shading rate block is block 1, it is adjusted to block 2 (the second shading rate block) through the texture offset value.
[0063] It should be noted that the difference between directly adjusting the quantity and adjusting the shading rate file can be understood, but not limited to, as directly adjusting the quantity is adjusting one (pixel) quantity to another different quantity, while adjusting the shading rate file can be understood, but not limited to, adjusting one shading rate file 1 to another different shading rate file 2. However, the quantities corresponding to shading rate file 1 and shading rate file 2 can be the same or different, which is more complex and can meet actual needs more flexibly.
[0064] To further illustrate, the optional number of pixels corresponding to shading rate level 1 is 1X1, while the number of pixels corresponding to shading rate level 2 is 1X1 or 2X2, that is, the same shading rate level can correspond to at least one or more numbers of pixels but is not limited to, and different shading rate levels can include different or the same number of pixels but are not limited to.
[0065] Through the embodiments provided in the present application, the first quantity is adjusted using the texture offset value to obtain the second quantity; or, the first shading rate block matching the first shading rate configuration is adjusted using the texture offset value to obtain the second shading rate block, wherein the first shading rate block includes at least one first pixel quantity, at least one first pixel quantity includes the first quantity, and the second shading rate block includes at least one second pixel quantity, at least one second pixel quantity includes the second quantity; the second quantity is determined from at least one pixel quantity, thereby achieving the purpose of more flexibly meeting actual needs, thereby achieving the technical effect of improving the adjustment flexibility of the shading rate configuration.
[0066] As an optional solution, before determining the second number from at least one number of pixels, the method further includes: determining a preferred direction of a shading rate of the target object based on texture details corresponding to the target object, wherein the preferred direction of the shading rate is used to indicate a configuration tendency of the texture details for different numbers of pixels;
[0067] Determining a second quantity from at least one pixel quantity includes: determining a second quantity matching a preferred direction of a shading rate from at least one pixel quantity.
[0068] Optionally, in this embodiment, the preferred shading rate direction is used to indicate the configuration tendency of texture details for different numbers of pixels. Further, when a shading rate file corresponds to multiple numbers of pixels, the preferred shading rate direction can be used to determine a unique number of pixels as the number of pixels applied for a single rendering operation, so as to improve the accuracy of the shading rate configuration.
[0069] To further illustrate, the optional number of pixels corresponding to shading rate level 2 is 1X1 or 2X2, and the preferred direction of shading rate is more inclined to 1X1, and then the number of pixels 1X1 is used as the number of pixels applied for a single rendering operation.
[0070] Through the embodiments provided by the present application, the preferred shading rate direction of the target object is determined based on the texture details corresponding to the target object, wherein the preferred shading rate direction is used to indicate the configuration tendency of the texture details for different numbers of pixels; a second number matching the preferred shading rate direction is determined from at least one number of pixels, thereby achieving the purpose of using the preferred shading rate direction to determine a unique number of pixels as the number of pixels applied for a single rendering operation, thereby realizing the technical effect of improving the accuracy of the shading rate configuration.
[0071] As an optional solution, in the process of performing the rendering operation on the target object according to the first shading rate configuration, the method further includes:
[0072] A first quantity matching a preferred direction of a shading rate is determined from the at least one first quantity of pixels.
[0073] Optionally, in this embodiment, the preferred shading rate direction is used to indicate the configuration tendency of texture details for different numbers of pixels. Further, when a shading rate file corresponds to multiple numbers of pixels, the preferred shading rate direction can be used to determine a unique number of pixels as the number of pixels applied for a single rendering operation, so as to improve the accuracy of the shading rate configuration.
[0074] It should be noted that in order to improve the accuracy of the shading rate configuration, the preferred shading rate direction is used to determine a unique number of pixels from multiple numbers of pixels corresponding to the basic shading rate configuration (first shading rate configuration) as the number of pixels applied for a single rendering operation.
[0075] Through the embodiments provided in the present application, a first number matching the preferred direction of the shading rate is determined from at least one first number of pixels, thereby achieving the purpose of using the preferred direction of the shading rate to determine a unique number of pixels as the number of pixels applied for a single rendering operation, thereby achieving the technical effect of improving the accuracy of the shading rate configuration.
[0076] As an optional solution, based on the texture details corresponding to the target object, the preferred direction of the shading rate of the target object is determined, including:
[0077] S2-1, convolving the material texture brightness image corresponding to the target object in at least two directions to obtain different image brightness gradient images in at least two directions;
[0078] S2-2, counting the number of target pixels that meet the detail-rich condition on brightness gradient maps of different images, and determining detail index values of the target object in at least two directions, wherein the detail index value is positively correlated with the number of target pixels, and the detail index value is used to represent the degree of texture detail of the target object in different directions;
[0079] S2-3, determining the target direction with the largest detail index value in at least two directions as the preferred direction of shading rate.
[0080] Optionally, in this embodiment, the method of convolving the material texture brightness image corresponding to the target object in at least two directions can be implemented based on, but not limited to, a Sobel operator, such as convolving the material texture brightness image with a Sobel operator in the horizontal direction to obtain a horizontal image brightness gradient map, wherein the Sobel operator can be used, but not limited to, to obtain the first-order gradient of a digital image, and the weighted difference of the grayscale values of the four areas of the upper, lower, left, and right of each pixel in the image reaches an extreme value at the edge to detect the edge. In addition, the convolution method can also be implemented, but not limited to, using a convolution layer in a neural network model, which is only used as an example here and is not limited.
[0081] Optionally, in this embodiment, the material texture brightness image may be, but is not limited to, an image that quantitatively or qualitatively describes the texture by extracting texture feature parameters of the target object using image processing technology.
[0082] Optionally, in this embodiment, the image brightness gradient map may be, but is not limited to, a convolution operation to solve the image gradient of the material texture brightness image to describe the details of the target object, wherein the image gradient is used to describe image changes.
[0083] Optionally, in this embodiment, the judgment of whether each pixel on the image brightness gradient map meets the detail-rich condition may be based on, but is not limited to, a comparison of the pixel's brightness gradient value with the product value of the current pixel brightness value multiplied by the gradient sensitivity ratio. If it is greater than, but is not limited to, it is considered to meet the detail-rich condition; otherwise, it is considered not to meet the detail-rich condition.
[0084] Optionally, in this embodiment, there is a negative correlation between the detail index value and the number of target pixels, and the detail index value is used to indicate the degree of texture detail of the target object in different directions. For example, the more target pixels there are in a first direction, the higher the detail index value in the first direction, and thus the higher the degree of texture detail of the target object in the first direction; for another example, the fewer target pixels there are in the second direction, the lower the detail index value in the second direction, and thus the lower the degree of texture detail of the target object in the second direction.
[0085] It should be noted that in order to improve the accuracy of the preferred direction of the shading rate, the method of gradient solving the image is used to obtain the detail index values of the target object in at least two directions, and the preferred direction of the shading rate is selected according to the size of the detail index value.
[0086] Through the embodiments provided by the present application, a material texture brightness image corresponding to a target object is convolved in at least two directions to obtain different image brightness gradient maps in at least two directions; the number of target pixels that meet detail-rich conditions on different image brightness gradient maps is counted to determine detail index values of the target object in at least two directions, wherein a positive correlation exists between the detail index value and the number of target pixels, and the detail index value is used to represent the degree of texture detail of the target object in different directions; the target direction having the largest detail index value in at least two directions is determined as the preferred direction of the shading rate, thereby achieving the purpose of selecting the preferred direction of the shading rate based on the size of the detail index value, thereby achieving the technical effect of improving the accuracy of the preferred direction of the shading rate.
[0087] As an optional solution, before performing a rendering operation on the target object according to the first shading rate configuration, the method further includes:
[0088] S3-1, determining an overall index value of the target object according to the texture details corresponding to the target object, wherein the overall index value is used to represent the overall texture detail level of the target object;
[0089] S3-2, determining a first quantity that matches the overall indicator value from a plurality of candidate quantities; or, determining a first shading rate block that matches the overall indicator value from a plurality of candidate shading rate blocks.
[0090] It should be noted that in order to improve the efficiency of obtaining the basic shading rate configuration (first shading rate configuration), the texture detail level of the target object in different directions will be ignored, and the overall index value used to represent the overall texture detail level of the target object will be directly obtained, and the overall index value will be further used to obtain the basic shading rate configuration.
[0091] Through the embodiments provided in the present application, the overall index value of the target object is determined according to the texture details corresponding to the target object, wherein the overall index value is used to represent the overall texture detail level of the target object; a first quantity matching the overall index value is determined from multiple candidate quantities; or a first shading rate block matching the overall index value is determined from multiple candidate shading rate blocks, thereby achieving the technical effect of improving the acquisition efficiency of the basic shading rate configuration (first shading rate configuration).
[0092] As an optional solution, the overall index value of the target object is determined according to the texture details corresponding to the target object, including:
[0093] S4-1, convolve the material texture brightness image corresponding to the target object to obtain a brightness gradient map of the target image;
[0094] S4-2, counting the number of all target pixels that meet the detail-rich condition on the target image brightness gradient map, and determining an overall index value, wherein the overall index value is positively correlated with the number of all target pixels.
[0095] Optionally, in this embodiment, the material texture brightness image may be, but is not limited to, an image that quantitatively or qualitatively describes the texture by extracting texture feature parameters of the target object using image processing technology.
[0096] Optionally, in this embodiment, the image brightness gradient map may be, but is not limited to, a convolution operation to solve the image gradient of the material texture brightness image to describe the details of the target object, wherein the image gradient is used to describe image changes.
[0097] Optionally, in this embodiment, the judgment of whether each pixel on the image brightness gradient map meets the detail-rich condition may be based on, but is not limited to, a comparison of the pixel's brightness gradient value with the product value of the current pixel brightness value multiplied by the gradient sensitivity ratio. If it is greater than, but is not limited to, it is considered to meet the detail-rich condition; otherwise, it is considered not to meet the detail-rich condition.
[0098] Optionally, in this embodiment, there is a negative correlation between the detail index value and the number of target pixels, and the detail index value is used to indicate the degree of texture detail of the target object in different directions. For example, the more target pixels there are in a first direction, the higher the detail index value in the first direction, and thus the higher the degree of texture detail of the target object in the first direction; for another example, the fewer target pixels there are in the second direction, the lower the detail index value in the second direction, and thus the lower the degree of texture detail of the target object in the second direction.
[0099] Through the embodiments provided in the present application, a material texture brightness image corresponding to a target object is convolved to obtain a target image brightness gradient map; the number of all target pixels on the target image brightness gradient map that meet detail-rich conditions is counted to determine an overall index value, wherein the overall index value is positively correlated with the number of all target pixels, thereby achieving the purpose of selecting a preferred direction of the shading rate based on the size of the detail index value, thereby realizing the technical effect of improving the accuracy of the preferred direction of the shading rate.
[0100] As an optional solution, the texture offset value corresponding to the deformation sampling operation is obtained, including:
[0101] When the deformation sampling operation is an enlargement sampling operation, a first offset value corresponding to the enlargement sampling operation is obtained; or when the deformation sampling operation is a reduction sampling operation, a second offset value corresponding to the reduction sampling operation is obtained, wherein the first offset value is greater than the second offset value;
[0102] Using the texture offset value to adjust the first quantity to obtain the second quantity includes: summing the first offset value and the first quantity to obtain a first summation result, and determining the first summation result as the second quantity;
[0103] The first shading rate block matching the first shading rate configuration is adjusted using a texture offset value to obtain a second shading rate block, including: summing the first offset value and the first shading rate block to obtain a second summation result, and upgrading the first shading rate block to a second shading rate block using the second summation result, wherein the level of the shading rate block is positively correlated with the number of pixels applied when performing a rendering operation.
[0104] Optionally, in this embodiment, the automatic dynamic adjustment of the shading rate configuration may be performed only when, but not limited to, the deformation sampling operation is an enlargement sampling operation, and when the deformation sampling operation is a reduction sampling operation, no automatic dynamic adjustment is performed, that is, the second offset value may be, but not limited to, 0.
[0105] It should be noted that when the file material texture is enlarged and sampled, the material texel color values of adjacent fragment samples become similar, which is the best time to apply the variable shading rate function visually lossless. Then, when the deformation sampling operation is an enlargement sampling operation, more offset values are obtained to sum up to obtain a higher-level shading rate file, and a higher-level shading rate file corresponds to a larger number of pixels applied in a single rendering operation, that is, corresponds to fewer rendering operations; conversely, when the deformation sampling operation is a reduction sampling operation, fewer offset values are obtained to sum up to obtain a lower-level shading rate file, and a lower-level shading rate file corresponds to a smaller number of pixels applied in a single rendering operation, that is, corresponds to more rendering operations.
[0106] Through the embodiments provided by the present application, when the deformation sampling operation is an enlargement sampling operation, a first offset value corresponding to the enlargement sampling operation is obtained; or, when the deformation sampling operation is a reduction sampling operation, a second offset value corresponding to the reduction sampling operation is obtained, wherein the first offset value is greater than the second offset value; the first offset value and the first quantity are summed to obtain a first summation result, and the first summation result is determined as the second quantity; the first offset value and the first shading rate file are summed to obtain a second summation result, and the second summation result is used to upgrade the first shading rate file to a second shading rate file, wherein the level of the shading rate file is positively correlated with the number of pixels applied when performing the rendering operation, thereby achieving the purpose of determining the best time for visually lossless application of the variable shading rate function, thereby achieving the technical effect of improving the execution efficiency of the rendering operation.
[0107] As an optional solution, before obtaining the texture offset value corresponding to the deformation sampling operation, the method further includes:
[0108] S5-1, obtaining the projected pixel area of the spherical bounding box of the target object after being projected onto the display area, and the hemispherical area of the spherical bounding box;
[0109] S5-2, dividing the projected pixel area and the hemisphere area to obtain the actual texture area required for performing a rendering operation on the target object;
[0110] S5-3, when the standard texture area of the target object is obtained and the actual texture area is larger than the standard texture area, the deformation sampling operation is determined to be an enlargement sampling operation; or, when the standard texture area is obtained and the actual texture area is smaller than the standard texture area, the deformation sampling operation is determined to be a reduction sampling operation.
[0111] Optionally, in this embodiment, the standard texture area of the target object may be understood, but not limited to, as an initial texture area set when the target object is created.
[0112] It should be noted that in order to accurately determine whether the deformation sampling operation is an enlargement sampling operation or a reduction sampling operation, the projected pixel area after the spherical bounding box of the target object is projected onto the display area is divided by the hemisphere area of the spherical bounding box as the actual texture area required for the target object to perform the rendering operation, and then the actual texture area is compared with the standard texture area of the target object.
[0113] Through the embodiments provided by the present application, the projected pixel area of the spherical bounding box of the target object after being projected onto the display area and the hemispherical area of the spherical bounding box are obtained; the projected pixel area and the hemispherical area are divided to obtain the actual texture area required for performing a rendering operation on the target object; when the standard texture area of the target object is obtained and the actual texture area is larger than the standard texture area, the deformation sampling operation is determined to be an enlargement sampling operation; or, when the standard texture area is obtained and the actual texture area is smaller than the standard texture area, the deformation sampling operation is determined to be a reduction sampling operation, thereby achieving the purpose of accurately determining whether the deformation sampling operation is an enlargement sampling operation or a reduction sampling operation, thereby achieving the technical effect of improving the accuracy of the deformation sampling operation.
[0114] As an optional solution, when a deformation sampling operation performed on a target object is obtained, a texture offset value corresponding to the deformation sampling operation is obtained, including at least one of the following:
[0115] S6-1, when a deformation sampling operation performed on a target object is obtained and the target object is located in a first target list, obtaining a texture offset value, wherein the objects in the first target list allow adaptive adjustment of corresponding shading rate configurations;
[0116] S6-2, when a deformation sampling operation is obtained for a target object and the target object is not in the second target list, a texture offset value is obtained, wherein the objects in the second target list are prohibited from adaptively adjusting the corresponding shading rate configuration.
[0117] It should be noted that in order to improve the flexibility of adjusting the color rate configuration, the adaptive dynamic adjustment of the color rate configuration is performed only when the deformation sampling operation performed on the target object is obtained and the target object is in the white list (first target list) or the target object is not in the black list (second target list). For the target object in the black list, the color rate configuration of the white list object can be manually adjusted in the background, but is not limited to.
[0118] Through the embodiments provided by the present application, when a deformation sampling operation performed on a target object is obtained and the target object is located in a first target list, a texture offset value is obtained, wherein the objects in the first target list allow adaptive adjustment of the corresponding shading rate configuration; when a deformation sampling operation performed on a target object is obtained and the target object is not located in a second target list, a texture offset value is obtained, wherein the objects in the second target list are prohibited from adaptive adjustment of the corresponding shading rate configuration, thereby achieving the purpose of adaptively and dynamically adjusting the shading rate configuration through the cooperation between the white list and the black list, thereby achieving the technical effect of improving the adjustment flexibility of the shading rate configuration.
[0119] As an optional solution, for the convenience of understanding, the execution method of the above rendering operation is applied to a virtual game scene. Specifically, when the variable shading rate function (VRS) is used to set the shading rate (ShadingRate) in units of Per-Draw, it is proposed to apply an image algorithm based on the material (Material: including shaders, textures and other elements) in the offline stage to analyze the material texture detail index, and based on this, automatically set the material shading rate grade (Shading Rate Grade) and the material shading rate preferred direction (Shading Rate Preferred Direction); based on the geometry (Mesh), dynamically calculate the geometry shading rate grade offset according to the material texture filtering application during the running stage. Finally, according to the geometry shading rate grade offset value, the material shading rate grade is adjusted as the drawing shading rate grade, and then according to the material shading rate preferred direction, the drawing shading rate of the rendered object is mapped to achieve an automatic dynamic adjustment method for the shading rate of the rendered object, so as to obtain the best balance between visual quality loss and performance gain.
[0120] It should be noted that the related art variable shading rate function implementation scheme that controls the shading rate in units of Per-Draw is to set a fixed shading rate through the material. There are two major problems in setting the shading rate of the rendered object. First, during the game development process, there are a large number of materials, and the workload of the artist to set the shading rate one by one is huge. In addition, the richness and simplicity of material details are judged by visual, non-quantitative standards, and the shading rate is then set. This is subjective and it is easy to set the shading rate inappropriately, introducing obvious visual differences (mosaic distortion). Second, when the game is running, the rendering details of the material in the scene will change after it is applied to the geometry. If this feature is not used to dynamically adjust the shading rate, the effectiveness of the variable shading rate function will be limited.
[0121] Optionally, in this embodiment, there are problems with the existing implementation scheme of the variable shading rate function that controls the shading rate in units of Per-Draw. This embodiment proposes to analyze the material texture detail index based on the application of image algorithms in the offline stage of the material, and automatically set the material shading rate file and the preferred direction of the material shading rate based on this; based on the application of material texture filtering in the running stage of the geometry, dynamically calculate the geometry shading rate file offset. Finally, the material shading rate file is adjusted by the geometry shading rate file offset value as the drawing shading rate file, and then combined with the preferred direction of the material shading rate, the drawing shading rate of the rendered object is mapped to achieve an automatic dynamic adjustment method for the shading rate of the rendered object, so as to obtain the best balance between visual quality loss and performance gain.
[0122] To further illustrate, for example, Figure 8As shown, the image gradient is used to obtain the overall detail index of the material, and the material shading rate grade (Shading Rate Grade, abbreviated SRG, optionally the material shading rate grade has 0 to 5 grades, respectively represented by 1x1, 1x1, 1x2 / 2x1, 2x2, 2x4 / 4x2 and 4x4 shading rate configurations) of the rendered object is determined based on the overall detail index, wherein the image gradient is used to describe the amplitude of the image change, and then when the material texture is enlarged and sampled, the geometric shading rate grade offset (Shading Rate Grade Offset, abbreviated SRGO, optionally the shading rate grade offset has 0 and 1) is calculated, and the material shading rate grade and the geometric shading rate grade offset are combined to obtain the drawing shading rate grade, and further combined with the drawing shading rate grade and the shading rate preferred direction (Shading Rate Preferred Direction) determined according to the lateral detail index and the total detail index of the material. Direction, abbreviated as SRPD, the optional preferred directions of shading rate are H (Horizontal) and V (Vertical), which respectively indicate that the preferred direction of shading rate is horizontal and the preferred direction of shading rate is vertical), and the actual drawing shading rate (the second shading rate configuration) is obtained. For example, when the shading rate level is 3, the corresponding shading rates are 1X2 / 2X1, and the preferred direction of shading rate is V, then 1X2 is taken, otherwise, 2X1 is taken.
[0123] Optionally based on Figure 8 The scene shown, continue as Fig. 9 As shown, the image gradient of the material texture is calculated by the image analysis algorithm in the offline stage as the detail index of the material, and based on this, the material shading rate file and the preferred direction of the material shading rate are automatically set; based on the relevant information of the geometry in the game scene during the running stage, the material texture filtering application is inferred, and the geometry shading rate file offset is dynamically calculated. The final rendering shading rate of the object is adjusted by the geometry shading rate file offset value to the material shading rate file, combined with the mapping of the preferred direction of the material shading rate, to achieve the automatic dynamic adjustment method of the rendering shading rate. When the object is rendered, the material and the geometry are constructed to draw the rendering instruction list, and the drawing shading rate parameter will be configured as the drawing shading rate. When the rendering logic module executes the specific rendering instruction, the shading rate of the grid (primitive) is set by glShadingRate before calling glDrawArray.
[0124] Optionally, in this embodiment, for materials with rich details, the reduction of the shading rate will cause obvious image quality loss, while for materials with simple details, the reduction of the shading rate is not sensitive to the image quality. The texture in the material approximately reflects the material details to a certain extent, and is proportional. Image algorithms can be applied to quantitatively evaluate the horizontal, vertical and comprehensive detail indicators of the material texture details in the offline stage. According to the comprehensive detail indicators, the material shading rate level is calculated, and then the preferred direction of the material shading rate is obtained according to the size relationship between the horizontal and vertical indicators of the material texture.
[0125] Optionally, in this embodiment, the image gradient describes the amplitude of the image change, and solving the gradient of the image is the most direct method to quantitatively evaluate its detail status. Specifically, it can be achieved by the Sobel operator. The material texture brightness image is convolved with the Sobel operator in the X direction to obtain the horizontal image brightness gradient map GradientImageX, set a gradient sensitivity ratio (empirical value), and then compare the brightness gradient value of each pixel with the current pixel brightness value multiplied by the gradient sensitivity ratio product value. If it is greater than 1, it means that the pixel contains rich details, otherwise it is marked as 0, and the detail description map DetailImagex is obtained. The number of detail-rich pixels DetailPixelsx and the total number of pixels in the material texture map TotalPixels are counted, and the horizontal detail index of the material Detailx = DetailPixelsx / TotalPixels can be obtained. Similarly, there is a vertical detail index of the material Detaily = DetailPixelsy / TotalPixels. The overall detail description map DetailImage of the material texture can be obtained by bitwise ORing DetailImagex and DetailImagey pixel by pixel, and the number of detail-rich pixels DetailPixels is counted, and the overall detail index of the material Detail = DetailPixels / TotalPixels can be obtained.
[0126] Optionally, in this embodiment, according to the overall detail index of the material, each interval is mapped to a shading rate file. The smaller the overall detail index of the material, the simpler the details, and the larger the shading rate file; conversely, the larger the overall detail index of the material, the richer the details, and the smaller the shading rate file. According to the horizontal detail index and the vertical detail index of the material, the preferred direction of the shading rate can be determined. When Detailx>Detaily, the shading rate direction is the vertical direction; otherwise, the horizontal direction is taken.
[0127] Optionally, in this embodiment, the variable shading rate function is to be applied to materials with simple details. Some materials have certain details, and from the perspective of the material alone, it is not suitable to apply the variable shading rate function. When the material is applied to a geometric body, the sampling and filtering algorithm of the material texture changes as the distance of the geometric body from the player's viewpoint changes. In some cases, the variable shading rate function becomes applicable. When the material texture is sampled amplified, the color values of the material texels sampled by adjacent fragments become similar, which is the best time to apply the variable shading rate function visually losslessly. At the same time, the variable shading rate function is applied to nearby renderings, the screen ratio is large, the number of pixels is large, and the performance optimization will be obvious.
[0128] Optionally, in this embodiment, if Fig.10 As shown, the dynamic shading rate file offset of the geometric body is implemented based on the principle that when the material texture is sampled by enlargement, the material texel color values sampled by adjacent fragments become similar, which is the best time to apply the variable shading rate function visually lossless. Specifically, the pixel area of the spherical bounding box of the geometric body after being projected onto the screen is divided by the hemisphere area of the spherical bounding box to obtain the texture area required per unit area when rendering the geometric body, and then the value is compared with the standard value of the material texture texel area per unit area designed when designing the material texture by art. If the texture area required per unit area of the spherical bounding box is greater than the standard value of the material texture texel area, the material texture sampling direction is inferred, and the overall magnification is mainly used, and the shading rate file offset is 1, otherwise, the shading rate file offset is 0.
[0129] Optionally, in this embodiment, if Fig.11 As shown, the variable shading rate manager adjusts the material shading rate file by the geometric shading rate file offset value to obtain the drawing shading rate level, and combines the material shading rate preferred direction mapping to obtain the drawing shading rate. The drawing shading rate level is calculated by adding the geometric shading rate file offset value to the material shading rate file; and the drawing shading rate file can be, but not limited to, 0 to 5 files, mapped to 1x1, 1x1, 1x2 / 2x1, 2x2, 2x4 / 4x2 and 4x4 shading rates respectively. When there are two shading rate configurations in the same file, the preferred shading rate is selected according to the preferred direction of the material shading rate. For example, when the shading rate file is 2, the corresponding shading rate is 1x2 / 2x1, and the preferred shading rate direction is V, then 1x2 is selected, otherwise, 2x1 is selected.
[0130] Optionally, in this embodiment, the rendering logic module is as follows: Fig.12 As shown, the rendering logic module needs to access the shading rate setting API. When OpenGL (ES) is loaded, the glShadingRate API pointer is taken out, and before glDrawArray is called, the current shading rate configuration is changed through glShadingRate.
[0131] Through the embodiments provided in this application, when the variable rate shading function (VRS) controls the shading rate (Shading Rate) application in units of Per-Draw, it is proposed to apply an image algorithm based on the material (Material: including shaders, textures and other elements) in the offline stage to analyze the material texture detail index, and based on this, automatically set the material shading rate grade (Shading Rate Grade) and the material shading rate preferred direction (Shading Rate Preferred Direction); based on the geometry (Mesh), dynamically calculate the geometry shading rate grade offset according to the material texture filtering application during the running stage. Finally, according to the geometry shading rate grade offset value, adjust the material shading rate grade as the drawing shading rate grade, and then according to the material shading rate preferred direction, map and obtain the drawing shading rate of the rendered object, and realize the automatic dynamic adjustment method of the shading rate of the rendered object, so as to obtain the best balance between visual quality loss and performance gain.
[0132] It is understandable that in the specific implementation of this application, related data such as user information is involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0133] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0134] According to another aspect of the embodiment of the present application, a rendering operation execution device for implementing the above rendering operation execution method is also provided. Fig.13 As shown, the device comprises:
[0135] A first rendering unit 1302, configured to perform a rendering operation on a target object according to a first shading rate configuration, wherein the first shading rate configuration is used to indicate that a number of pixels applied when performing the rendering operation is a first number;
[0136] An offset unit 1304 is used to obtain a texture offset value corresponding to the deformation sampling operation when a deformation sampling operation is performed on the target object, wherein the texture offset value is used to indicate a texture change of the target object caused by the deformation sampling operation;
[0137] The second rendering unit 1306 is used to adjust the first shading rate configuration using the texture offset value to obtain a second shading rate configuration, and perform a rendering operation on the target object according to the second shading rate configuration, wherein the second shading rate configuration is used to indicate that the number of pixels applied when performing the rendering operation is a second number.
[0138] For specific embodiments, reference may be made to the examples shown in the above-mentioned apparatus for executing rendering operations, which will not be described in detail in this example.
[0139] As an optional solution, the second rendering unit 1306 includes:
[0140] A first adjustment module is configured to adjust the first quantity by using the texture offset value to obtain a second quantity; or
[0141] A second adjustment module is used to adjust a first shading rate block matched with the first shading rate configuration using a texture offset value to obtain a second shading rate block, wherein the first shading rate block includes at least one first pixel quantity, the at least one first pixel quantity includes the first quantity, and the second shading rate block includes at least one second pixel quantity, the at least one second pixel quantity includes the second quantity;
[0142] The first determination module is used to determine a second number from at least one pixel number.
[0143] For a specific embodiment, reference may be made to the example shown in the method for executing the rendering operation described above, which will not be described in detail in this example.
[0144] As an optional solution, the device further includes: a second determination module, used to determine a preferred direction of a shading rate of the target object based on texture details corresponding to the target object before determining the second number from the at least one number of pixels, wherein the preferred direction of the shading rate is used to indicate a configuration tendency of the texture details for different numbers of pixels;
[0145] The first determination module includes: a first determination submodule, which is used to determine a second quantity matching the preferred direction of the shading rate from at least one pixel quantity.
[0146] For a specific embodiment, reference may be made to the example shown in the method for executing the rendering operation described above, which will not be described in detail in this example.
[0147] As an optional solution, the device also includes:
[0148] The second determination submodule is used to determine a first quantity matching the preferred direction of the shading rate from at least one first number of pixels during a rendering operation on the target object according to the first shading rate configuration.
[0149] For a specific embodiment, reference may be made to the example shown in the method for executing the rendering operation described above, which will not be described in detail in this example.
[0150] As an optional solution, the second determining module includes:
[0151] A first convolution submodule is used to convolve the material texture brightness image corresponding to the target object in at least two directions to obtain different image brightness gradient images in at least two directions;
[0152] The second statistical submodule is used to count the number of target pixels that meet the detail-rich condition on the brightness gradient maps of different images, and determine the detail index value of the target object in at least two directions, wherein there is a positive correlation between the detail index value and the number of target pixels, and the detail index value is used to represent the texture detail degree of the target object in different directions;
[0153] The third determination submodule is used to determine the target direction with the largest detail index value in at least two directions as the preferred direction of the shading rate.
[0154] For a specific embodiment, reference may be made to the example shown in the method for executing the rendering operation described above, which will not be described in detail in this example.
[0155] As an optional solution, the device also includes:
[0156] A third determination module is used to determine an overall index value of the target object according to texture details corresponding to the target object before performing a rendering operation on the target object according to the first shading rate configuration, wherein the overall index value is used to represent an overall texture detail level of the target object;
[0157] The fourth determination module is used to determine a first quantity that matches the overall indicator value from multiple candidate quantities before performing a rendering operation on the target object according to the first shading rate configuration; or to determine a first shading rate block that matches the overall indicator value from multiple candidate shading rate blocks.
[0158] For a specific embodiment, reference may be made to the example shown in the method for executing the rendering operation described above, which will not be described in detail in this example.
[0159] As an optional solution, the third determination module includes:
[0160] The second convolution submodule is used to convolve the material texture brightness image corresponding to the target object to obtain a brightness gradient map of the target image;
[0161] The second statistical submodule is used to count the number of all target pixels that meet the detail-rich condition on the target image brightness gradient map to determine the overall index value, wherein the overall index value is negatively correlated with the number of all target pixels.
[0162] For a specific embodiment, reference may be made to the example shown in the method for executing the rendering operation described above, which will not be described in detail in this example.
[0163] As an optional solution, the offset unit 1304 includes:
[0164] A first acquisition module is used to acquire a first offset value corresponding to the enlargement sampling operation when the deformation sampling operation is an enlargement sampling operation; or to acquire a second offset value corresponding to the reduction sampling operation when the deformation sampling operation is a reduction sampling operation, wherein the first offset value is greater than the second offset value;
[0165] The first adjustment module includes: a first summing submodule, configured to sum the first offset value and the first quantity to obtain a first summing result, and determine the first summing result as a second quantity;
[0166] The second adjustment module includes: a second summing submodule, which is used to sum the first offset value and the first shading rate file to obtain a second summing result, and use the second summing result to upgrade the first shading rate file to a second shading rate file, wherein the level of the shading rate file is negatively correlated with the number of pixels applied when performing the rendering operation.
[0167] For a specific embodiment, reference may be made to the example shown in the method for executing the rendering operation described above, which will not be described in detail in this example.
[0168] As an optional solution, the device also includes:
[0169] A second acquisition module is used to acquire the projected pixel area of the spherical bounding box of the target object after being projected onto the display area, and the hemispherical area of the spherical bounding box before acquiring the texture offset value corresponding to the deformation sampling operation;
[0170] A division module is used to divide the projected pixel area and the hemisphere area before obtaining the texture offset value corresponding to the deformation sampling operation, so as to obtain the actual texture area required for performing the rendering operation on the target object;
[0171] The fifth determination module is used to determine, before obtaining the texture offset value corresponding to the deformation sampling operation, that the deformation sampling operation is an enlargement sampling operation when the standard texture area of the target object is obtained and the actual texture area is larger than the standard texture area; or, when the standard texture area is obtained and the actual texture area is smaller than the standard texture area, determine that the deformation sampling operation is a reduction sampling operation.
[0172] For a specific embodiment, reference may be made to the example shown in the method for executing the rendering operation described above, which will not be described in detail in this example.
[0173] As an optional solution, the offset unit 1304 includes at least one of the following:
[0174] A third acquisition module is used to acquire a texture offset value when a deformation sampling operation performed on a target object is acquired and the target object is located in a first target list, wherein the objects in the first target list allow adaptive adjustment of corresponding shading rate configurations;
[0175] The fourth acquisition module is used to acquire the texture offset value when the deformation sampling operation performed on the target object is acquired and the target object is not located in the second target list, wherein the objects in the second target list are prohibited from adaptively adjusting the corresponding shading rate configuration.
[0176] For a specific embodiment, reference may be made to the example shown in the method for executing the rendering operation described above, which will not be described in detail in this example.
[0177] According to another aspect of the embodiment of the present application, an electronic device for implementing the above-mentioned rendering operation execution method is also provided. The electronic device can be but is not limited to being Figure 1 The user device 102 or the server 112 shown in FIG. 1 is used as an example to illustrate the electronic device as the user device 102. Fig.14 As shown, the electronic device includes a memory 1402 and a processor 1404. The memory 1402 stores a computer program, and the processor 1404 is configured to execute the steps in any of the above method embodiments through the computer program.
[0178] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.
[0179] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0180] S1, performing a rendering operation on a target object according to a first shading rate configuration, wherein the first shading rate configuration is used to indicate that the number of pixels applied when performing the rendering operation is a first number;
[0181] S2, when a deformation sampling operation performed on the target object is obtained, obtaining a texture offset value corresponding to the deformation sampling operation, wherein the texture offset value is used to represent a texture change of the target object caused by the deformation sampling operation;
[0182] S3, using the texture offset value to adjust the first shading rate configuration to obtain a second shading rate configuration, and performing a rendering operation on the target object according to the second shading rate configuration, wherein the second shading rate configuration is used to indicate that the number of pixels applied when performing the rendering operation is a second number.
[0183] Alternatively, a person skilled in the art may understand that: Fig.14 The structure shown is for illustration only. Fig.14 The structure of the electronic device is not limited. Fig.14 More or fewer components (such as network interfaces, etc.) as shown in, or with Fig.14 Different configurations shown.
[0184] Among them, the memory 1402 can be used to store software programs and modules, such as the program instructions / modules corresponding to the execution method and device of the rendering operation in the embodiment of the present application. The processor 1404 executes various functional applications and data processing by running the software programs and modules stored in the memory 1402, that is, realizing the execution method of the above-mentioned rendering operation. The memory 1402 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1402 may further include a memory remotely arranged relative to the processor 1404, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned networks include but are not limited to the Internet, corporate intranets, local area networks, mobile communication networks and combinations thereof. Among them, the memory 1402 can be specifically used, but not limited to, to store information such as a first shading rate configuration, a texture offset value, and a second shading rate configuration. As an example, such as Fig.14 As shown, the memory 1402 may include but is not limited to the first rendering unit 1302, the offset unit 1304 and the second rendering unit 1306 in the rendering operation execution device. In addition, it may also include but is not limited to other module units in the rendering operation execution device, which will not be repeated in this example.
[0185] Optionally, the transmission device 1406 is used to receive or send data via a network. Specific examples of the above-mentioned network may include a wired network and a wireless network. In one example, the transmission device 1406 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 1406 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0186] In addition, the electronic device further includes: a display 1408 for displaying information such as the first shading rate configuration, texture offset value and second shading rate configuration; and a connection bus 1410 for connecting various module components in the electronic device.
[0187] In other embodiments, the user device or server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes through network communication. Among them, the nodes may form a peer-to-peer (P2P) network, and any form of computing device, such as a server, user device, or other electronic device, may become a node in the blockchain system by joining the peer-to-peer network.
[0188] According to one aspect of the present application, a computer program product is provided, the computer program product comprising a computer program / instruction, the computer program / instruction comprising a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part, and / or installed from a removable medium. When the computer program is executed by a central processing unit, various functions provided by the embodiments of the present application are executed.
[0189] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0190] It should be noted that the computer system of the electronic device is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0191] The computer system includes a central processing unit (CPU), which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) or the program loaded from the storage part to the random access memory (RAM). In the random access memory, various programs and data required for system operation are also stored. The central processing unit, the read-only memory and the random access memory are connected to each other through a bus. The input / output interface (I / O interface) is also connected to the bus.
[0192] The following components are connected to the input / output interface: an input part including a keyboard, a mouse, etc.; an output part including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage part including a hard disk, etc.; and a communication part including a network interface card such as a local area network card, a modem, etc. The communication part performs communication processing via a network such as the Internet. A drive is also connected to the input / output interface as needed. Removable media, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., are installed on the drive as needed so that the computer program read therefrom is installed into the storage part as needed.
[0193] In particular, according to an embodiment of the present application, the process described in each method flow chart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer readable medium, and the computer program contains a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part, and / or installed from a removable medium. When the computer program is executed by a central processing unit, various functions defined in the system of the present application are executed.
[0194] According to one aspect of the present application, a computer-readable storage medium is provided, and a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the above-mentioned various optional implementations.
[0195] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0196] S1, performing a rendering operation on a target object according to a first shading rate configuration, wherein the first shading rate configuration is used to indicate that the number of pixels applied when performing the rendering operation is a first number;
[0197] S2, when a deformation sampling operation performed on the target object is obtained, obtaining a texture offset value corresponding to the deformation sampling operation, wherein the texture offset value is used to represent a texture change of the target object caused by the deformation sampling operation;
[0198] S3, using the texture offset value to adjust the first shading rate configuration to obtain a second shading rate configuration, and performing a rendering operation on the target object according to the second shading rate configuration, wherein the second shading rate configuration is used to indicate that the number of pixels applied when performing the rendering operation is a second number.
[0199] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing hardware related to the electronic device through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0200] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0201] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
[0202] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0203] In the several embodiments provided in the present application, it should be understood that the disclosed user equipment can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0204] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of this embodiment.
[0205] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0206] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for performing a rendering operation, characterized in that: include: Performing a rendering operation on the target object according to a first shading rate configuration, wherein the first shading rate configuration is used to indicate that a number of pixels applied when performing the rendering operation is a first number; When a deformation sampling operation performed on the target object is obtained, a texture offset value corresponding to the deformation sampling operation is obtained, wherein the texture offset value is used to represent a texture change of the target object caused by the deformation sampling operation; The first shading rate configuration is adjusted using the texture offset value to obtain a second shading rate configuration, and the rendering operation is performed on the target object according to the second shading rate configuration, wherein the second shading rate configuration is used to indicate that the number of pixels applied when performing the rendering operation is a second number.
2. The method according to claim 1, characterized in that The adjusting the first shading rate configuration by using the texture offset value to obtain a second shading rate configuration includes: Using the texture offset value to adjust the first number to obtain the second number; or, Using the texture offset value, adjusting a first shading rate block matched with the first shading rate configuration to obtain a second shading rate block, wherein the first shading rate block includes at least one first pixel quantity, the at least one first pixel quantity includes the first quantity, and the second shading rate block includes at least one second pixel quantity, the at least one second pixel quantity includes the second quantity; The second number is determined from the at least one number of pixels.
3. The method according to claim 2, characterized in that Before determining the second number from the at least one number of pixels, the method further includes: determining a preferred direction of a shading rate of the target object based on texture details corresponding to the target object, wherein the preferred direction of the shading rate is used to represent a configuration tendency of the texture details for different numbers of pixels; Determining the second number from the at least one pixel number includes: determining the second number matching the preferred direction of the shading rate from the at least one pixel number.
4. The method according to claim 3, characterized in that In the process of performing a rendering operation on the target object according to the first shading rate configuration, the method further includes: The first quantity matching the preferred direction of the shading rate is determined from the at least one first pixel quantity.
5. The method according to claim 3, characterized in that: The determining, based on the texture details corresponding to the target object, a preferred direction of the shading rate of the target object comprises: Convolving the material texture brightness image corresponding to the target object in at least two directions to obtain different image brightness gradient images in the at least two directions; Counting the number of target pixels that meet the detail-rich condition on the brightness gradient maps of the different images, and determining detail index values of the target object in the at least two directions, wherein there is a positive correlation between the detail index value and the number of target pixels, and the detail index value is used to represent the degree of texture detail of the target object in different directions; The target direction with the largest detail index value in the at least two directions is determined as the preferred direction of the shading rate.
6. The method according to claim 2, characterized in that Before performing the rendering operation on the target object according to the first shading rate configuration, the method further includes: Determining an overall index value of the target object according to the texture details corresponding to the target object, wherein the overall index value is used to represent the overall texture detail level of the target object; Determine the first quantity that matches the overall indicator value from a plurality of candidate quantities; or determine the first shading rate block that matches the overall indicator value from a plurality of candidate shading rate blocks.
7. The method according to claim 6, characterized in that Determining the overall index value of the target object according to the texture details corresponding to the target object includes: Convolving the material texture brightness image corresponding to the target object to obtain a target image brightness gradient map; The number of all target pixels that meet the detail-rich condition on the target image brightness gradient map is counted to determine the overall index value, wherein the overall index value is positively correlated with the number of all target pixels.
8. The method according to claim 2, characterized in that: The obtaining of the texture offset value corresponding to the deformation sampling operation includes: When the deformation sampling operation is an enlargement sampling operation, obtaining a first offset value corresponding to the enlargement sampling operation; or when the deformation sampling operation is a reduction sampling operation, obtaining a second offset value corresponding to the reduction sampling operation, wherein the first offset value is greater than the second offset value; The adjusting the first quantity by using the texture offset value to obtain the second quantity includes: summing the first offset value and the first quantity to obtain a first summation result, and determining the first summation result as the second quantity; The method of using the texture offset value to adjust the first shading rate block matching the first shading rate configuration to obtain a second shading rate block includes: summing the first offset value and the first shading rate block to obtain a second summation result, and using the second summation result to upgrade the first shading rate block to the second shading rate block, wherein the level of the shading rate block is positively correlated with the number of pixels applied when performing the rendering operation.
9. The method according to claim 8, characterized in that Before obtaining the texture offset value corresponding to the deformation sampling operation, the method further includes: Obtaining the projected pixel area of the spherical bounding box of the target object after being projected onto the display area, and the hemispherical area of the spherical bounding box; Dividing the projection pixel area and the hemisphere area to obtain an actual texture area required for performing the rendering operation on the target object; When the standard texture area of the target object is obtained and the actual texture area is larger than the standard texture area, the deformation sampling operation is determined to be an enlargement sampling operation; or, when the standard texture area is obtained and the actual texture area is smaller than the standard texture area, the deformation sampling operation is determined to be a reduction sampling operation.
10. The method according to any one of claims 1 to 9, characterized in that The acquiring, when a deformation sampling operation performed on the target object is acquired, a texture offset value corresponding to the deformation sampling operation comprises at least one of the following: When the deformation sampling operation performed on the target object is obtained and the target object is located in a first target list, obtaining the texture offset value, wherein the objects in the first target list allow adaptive adjustment of the corresponding shading rate configuration; When the deformation sampling operation performed on the target object is obtained and the target object is not located in a second target list, the texture offset value is obtained, wherein the objects in the second target list are prohibited from adaptively adjusting the corresponding shading rate configuration.
11. A device for executing a rendering operation, characterized in that: include: A first rendering unit, configured to perform a rendering operation on a target object according to a first shading rate configuration, wherein the first shading rate configuration is used to indicate that a number of pixels applied when performing the rendering operation is a first number; an offset unit, configured to, when a deformation sampling operation performed on the target object is acquired, acquire a texture offset value corresponding to the deformation sampling operation, wherein the texture offset value is used to represent a texture change of the target object caused by the deformation sampling operation; A second rendering unit is used to adjust the first shading rate configuration using the texture offset value to obtain a second shading rate configuration, and perform the rendering operation on the target object according to the second shading rate configuration, wherein the second shading rate configuration is used to indicate that the number of pixels applied when performing the rendering operation is a second number.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 10 when executed by an electronic device.
13. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method described in any one of claims 1 to 10 are implemented.
14. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 10 through the computer program.
Citation Information
Patent Citations
Graphics processing
CN113781289A
Interface rendering method and device, storage medium and electronic equipment
CN113936089A
Graphics processing
GB202107934D0
Hybrid multisample / supersample antialiasing
KR1020100004890A
Variable rate shading
US20180240268A1
