Landscape virtual screen display method and device, electronic device, and computer program
By employing a landscape layer index map and weight map to optimize texture sampling, the method addresses the complexity of displaying landscape virtual screens, enhancing rendering efficiency and transition smoothness.
Patent Information
- Application Number
- JP2023519590
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2021-01-07
- Filing Date
- 2021-12-30
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2041-12-30
AI Technical Summary
The existing methods for displaying landscape virtual screens require a large number of texture samplings, leading to complicated display operations as the number of landscape layers increases, particularly when only a part of the landscape block area is rendered with non-zero weights.
A method involving the use of a landscape layer index map and a weight map to store index values and display weights, allowing for filter calculations to skip guard pixels and perform screen rendering efficiently, thereby reducing the number of samplings required.
This approach simplifies the rendering process by minimizing the number of texture samplings, improving rendering efficiency and ensuring smooth transitions between landscape layers without complex operations.
Smart Images

Figure 0007585573000006 
Figure 0007585573000007 
Figure 0007585573000008
Abstract
Description
[Technical field]
[0001] This application claims priority to a Chinese patent application filed with the China Patent Office on January 7, 2021, bearing application number 202110019382.2 and entitled "Landscape simulation screen display method and device, storage medium and electronic device," the entire contents of which are incorporated herein by reference.
[0002] The present application relates to the field of computer technology, and in particular to a method and apparatus for displaying a landscape virtual screen, as well as an electronic device and a computer program. [Background technology]
[0003] In virtual scenes provided by many terminal applications, in order to present a virtual screen to users that is close to the landscape in the real world, multiple landscape components are often used to simulate different layers of landscape topology, and each landscape layer is used to represent a pair of texture maps of different landscape types (also called varieties). One is a main map, which is used to store the main color information, and the other is a normal map, which is used to store normal information. This allows the landscape virtual screen to show the uneven terrain on the landscape by performing lighting calculations.
[0004] For now, the commonly used method is to mix multiple landscape types using one map. For example, this is realized by the four channels of RGBA (Red, Green, Blue, Alpha) in this one map. Specifically, the weights for representing the four landscape layers are stored in the four channels of RGBA mentioned above, and multiple landscape types are mixed based on these weights to generate the landscape virtual screen you want to display.
[0005] However, in order to obtain information in each channel in the above-mentioned one map, texture sampling needs to be performed nine times. That is, as the number of landscape layers increases, the number of texture samplings corresponding to this method also increases significantly. In addition, for one landscape layer, only a part of a landscape block area is rendered, and the weight of the other part is 0, and this landscape block area still needs to be sampled. That is, when the related technology is used to display a landscape virtual screen, there is a problem that the display operation becomes complicated due to the large number of samplings.
[0006] No effective solution to the above problems has yet been proposed. Summary of the Invention [Problem to be solved by the invention]
[0007] An object of the embodiments of the present invention is to provide a method and apparatus for displaying a landscape virtual screen, as well as an electronic device and a computer program, for solving at least the technical problem of cumbersome display operations caused by a large number of samplings. [Means for solving the problem]
[0008] According to one aspect of an embodiment of the present invention, there is provided a method for displaying a landscape virtual screen, the method being executed by a terminal, the method comprising: Obtain a landscape layer index map corresponding to a target landscape area currently waiting to be displayed; and obtain a weight map matching the landscape layer index map, in which each pixel in each image color channel in the landscape layer index map is used to store an index value in a texture array of one landscape layer, a set of pixel clusters in each image color channel of the weight map correspondingly stores a display weight cluster of the one landscape layer, the set of pixel clusters includes a reference pixel and a guard pixel matched with the reference pixel, the reference pixel is a pixel having a mapping relationship with a pixel in the landscape layer index map, and the guard pixel matched with the reference pixel has a position association relationship with the reference pixel (i.e., the position of the guard pixel is associated with the position of the reference pixel); and Landscape Layer a pixel representing, the display weight cluster including a target display weight corresponding to the reference pixel and a reference weight corresponding to a guard pixel; performing a filter calculation for each set of the pixel clusters in the weight map, skipping the protection pixels, and obtaining the target display weights corresponding to pixels in the landscape layer index map; and The method includes performing screen rendering based on the landscape layer index map and the target display weights in the weight map to display a landscape virtual screen corresponding to the target landscape area.
[0009] According to another aspect of an embodiment of the present invention, there is further provided a landscape virtual screen display device, the device comprising: An acquisition unit for obtaining a landscape layer index map corresponding to a target landscape area currently waiting to be displayed and a weight map matching the landscape layer index map, where each pixel in each image color channel in the landscape layer index map is used to store an index value in a texture array of one landscape layer, a set of pixel clusters in each image color channel of the weight map correspondingly stores a display weight cluster of the one landscape layer, the set of pixel clusters includes a reference pixel and a guard pixel matched with the reference pixel, the reference pixel is a pixel having a mapping relationship with a pixel in the landscape layer index map, and the guard pixel matched with the reference pixel has a position association relationship with the reference pixel; Landscape Layer a pixel representing,the display weight cluster including a target display weight corresponding to the reference pixel and a reference weight corresponding to a guard pixel; a calculation unit for performing a filter calculation for each set of the pixel clusters in the weight map, skipping the protection pixels, and obtaining the target display weight corresponding to a pixel in the landscape layer index map; and A display unit is included for performing screen rendering based on the landscape layer index map and the target display weights in the weight map to display a landscape virtual screen corresponding to the target landscape area.
[0010] A non-volatile readable storage medium is provided having one or more computer readable instructions stored thereon, which, when executed by one or more processors, cause the one or more processors to perform the method for displaying the landscape virtual screen.
[0011] Also provided is a computing device including a memory and one or more processors, the memory having computer readable instructions stored therein which, when executed by the processor, cause the one or more processors to perform the method for displaying the landscape virtual screen. [Brief description of the drawings]
[0012] [Figure 1] FIG. 2 is a diagram showing a hardware environment for a method for displaying a selectable landscape virtual screen in an embodiment of the present invention. [Diagram 2] FIG. 11 is a diagram showing a hardware environment for another selectable landscape virtual screen display method in an embodiment of the present invention. [Diagram 3] 10 is a flowchart of another selectable landscape virtual screen display method in an embodiment of the present invention. [Figure 4] FIG. 13 is a diagram showing a method for displaying a selectable landscape virtual screen in an embodiment of the present invention. [Diagram 5] FIG. 11 is a diagram showing another selectable landscape virtual screen display method in an embodiment of the present invention. [Figure 6] FIG. 13 is a diagram illustrating a method for displaying another selectable landscape virtual screen in an embodiment of the present invention. [Figure 7] FIG. 13 is a diagram illustrating a method for displaying another selectable landscape virtual screen in an embodiment of the present invention. [Figure 8] FIG. 13 is a diagram illustrating a method for displaying another selectable landscape virtual screen in an embodiment of the present invention. [Figure 9] FIG. 13 is a diagram illustrating a method for displaying another selectable landscape virtual screen in an embodiment of the present invention. [Figure 10] 10 is a flowchart of another selectable landscape virtual screen display method in an embodiment of the present invention. [Figure 11] FIG. 13 is a diagram illustrating a method for displaying another selectable landscape virtual screen in an embodiment of the present invention. [Figure 12] FIG. 13 is a diagram illustrating a method for displaying another selectable landscape virtual screen in an embodiment of the present invention. [Figure 13] FIG. 13 is a diagram illustrating a method for displaying another selectable landscape virtual screen in an embodiment of the present invention. [Figure 14] FIG. 13 is a diagram illustrating a method for displaying another selectable landscape virtual screen in an embodiment of the present invention. [Figure 15] FIG. 13 is a diagram illustrating a method for displaying another selectable landscape virtual screen in an embodiment of the present invention. [Figure 16] FIG. 13 is a diagram illustrating a method for displaying another selectable landscape virtual screen in an embodiment of the present invention. [Figure 17] FIG. 13 is a diagram illustrating a method for displaying another selectable landscape virtual screen in an embodiment of the present invention. [Figure 18] FIG. 2 is a diagram showing the configuration of a selectable landscape virtual screen device in an embodiment of the present invention. [Figure 19] FIG. 2 is a diagram showing the configuration of selectable electronic devices in an embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0013] It should be noted that the terms "first", "second", and the like in the present specification and claims and the drawings are used to distinguish between similar objects and are not intended to limit the specific order or order of precedence or follow. It should be understood that the data so used may be exchanged, where appropriate, to cause the embodiments of the present invention described herein to be performed according to an order other than that illustrated or described herein. In addition, the terms "comprise" and "have" and any variations thereof are intended to cover a non-exclusive inclusion, e.g., a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the steps or units explicitly listed, but may also include other steps or units that are not explicitly listed or that are inherent to the process, method, product, or apparatus that is explicitly listed.
[0014] In the examples of this application, the following technical terms may be used, but are not limited to them.
[0015] Rendering: The process of converting basic graphics primitives (triangles, quadrilaterals, points, lines, etc.) into 2D screen pixels.
[0016] Landscape: A feature offered in mainstream commercial engines that can be used to create very complex landscapes.
[0017] Landscape Layer: Used to represent a pair of texture maps of different Landscape types, usually contains two maps, one is a primary map, used to store the main color information, and the other is a normal map, used to store normal information, allowing the Landscape virtual screen to show the uneven terrain on the Landscape by performing lighting calculations.
[0018] Texture Splatting Technique: It is a method to solve the blending of multiple landscape types using one map. It uses four channels of RGBA in one map to store the weights of four landscape layers respectively. Finally, it blends the landscapes based on such weight information.
[0019] UE4: Its official name is Unreal Engine 4. It is a next-generation commercial game engine that can be used to create games with highly realistic screen effects and extremely high execution performance. It can also be used to create game platforms of various scales, from simple mobile games to 3A blockbusters.
[0020] Graphics Processing Unit (GPU): A chip dedicated to processing graphics and images used in modern personal computers, servers, mobile devices, game consoles, etc.
[0021] Frame Buffer: Abbreviated as video memory, it is a direct image of the screen displayed on the screen, also called bitmap or raster. Each storage unit of the frame buffer corresponds to one pixel on the screen, and the entire frame buffer corresponds to one frame of image. A typical frame buffer includes a color buffer and a depth buffer, and may also include a template buffer, a multi-sampling buffer, etc. according to the hardware environment or the needs of game development.
[0022] Activation / Deactivation: Activation means that an object or component is playing its role normally in the game, while deactivation means that it has no effect in the game and can be considered as not existing. However, even if an object / component is deactivated, it is still loaded in the scene, so changing it to active is faster and less disruptive than loading this object / component temporarily.
[0023] Video memory: also called graphics memory or frame buffer. It is used to store rendering data that has been processed or is about to be read by the graphics chip. Similar to computer memory, video memory is a hardware for storing graphics data. The screen displayed on the display is made up of individual pixel points, each of which has its brightness and color controlled by 4 to 64 bits of data, and these points constitute one frame of graphics screen. In order to keep the screen smooth, the pixel data of multiple frames that need to be output and processed need to be stored in the video memory to achieve a buffer effect, and then they are calculated and processed by the graphics chip and the central processor, and finally the calculation result is converted into a graphic and output to the display.
[0024] Memory: Internal storage that directly exchanges data with the Central Processing Unit (CPU), and is used to load various programs and data for the CPU to directly execute or call. In mobile devices, video memory and memory share the same memory chips and also share the same channel for data exchange, and such hardware greatly limits the bandwidth of the video memory in mobile devices.
[0025] Actor, Component, Section, Quad: These are multi-level segmentation schemes of landscape components.
[0026] According to one aspect of an embodiment of the present invention, a method for displaying a landscape virtual screen is provided, and optionally, as a selectable embodiment, the method for displaying a landscape virtual screen can be applied to a landscape virtual screen display system in a hardware environment as shown in Fig. 1, but is not limited thereto. Wherein, the display of the landscape virtual screen can include, but is not limited to, a display by a terminal device 102. A target application client (e.g., a game application client, a navigation application client, etc.) is executed in the terminal device 102. The terminal device 102 includes a human-machine interaction screen 1022, a processor 1024, and a memory device 1026. The human-machine interaction screen 1022 is used to display an interface in a virtual scene provided by the target application client, for example, a landscape virtual screen to be displayed in the embodiment of the present application, and is further used to provide a human-machine interaction interface to receive a human-machine interaction operation performed on the human-machine interaction interface, and the processor 1024 is used to obtain a human-machine interaction instruction, for example, a rendering instruction for rendering the landscape virtual screen, in response to the human-machine interaction operation. The memory 1026 is used to store the landscape layer index map and weight map (for example, in a memory in a terminal device), and is further used to store the landscape virtual screen to be displayed (for example, in a frame buffer in a terminal device).
[0027] The specific process is as follows: A game application client is running on the terminal device 102, and the game application client uses the method provided in the embodiment of the present application to render and display a screen of a mountain path provided in the game virtual scene, as shown in Fig. 1. The specific process is as follows: Steps S102-S108.
[0028] In step S102, the terminal device 102 obtains a landscape layer index map corresponding to the target landscape area currently waiting to be displayed, and also obtains a weight map that matches the landscape layer index map. Then, in step S104, a filter calculation is performed on each set of pixel clusters in the weight map to skip protected pixels, and a target display weight corresponding to the pixel in the landscape layer index map is obtained (for example, by the image processing unit GPU in the terminal device). Then, in step S106, screen rendering is performed according to the landscape layer index map and the target display weight in the weight map, thereby realizing step S108, i.e., displaying a landscape virtual screen corresponding to the target landscape area.
[0029] It should be noted that in this embodiment, a landscape layer index map corresponding to the target landscape area currently waiting to be displayed and a weight map matching the landscape layer index map are obtained, where each pixel in each image color channel in the landscape layer index map is used to store an index value in the texture array of one landscape layer, a set of pixel clusters in each image color channel of the weight map stores a target display weight cluster of one landscape layer correspondingly, the set of pixel clusters includes a reference pixel corresponding to a pixel in the landscape layer index map and a guard pixel matching the reference pixel, i.e., the set of pixel clusters further includes a guard pixel matching the pixel in the landscape layer index map, and the display weight cluster includes a target display weight for displaying one landscape layer with a pixel in the landscape layer index map, i.e., the display weight cluster includes a target display weight of the reference pixel, and the display weight cluster further includes a reference weight corresponding to the guard pixel matching the pixel in the landscape layer index map. It can be understood that the target display weight is the pixel value of the reference pixel, and the reference weight is the pixel value of the guard pixel. Then, the terminal skips protected pixels by performing a filter calculation for each pixel cluster in the weight map, obtains target display weights corresponding to pixels in a landscape layer index map, and performs screen rendering based on the landscape layer index map and the target display weights in the weight map, thereby displaying a landscape virtual screen corresponding to the target landscape area.In other words, by adopting two maps, a landscape layer index map and a weight map, instead of a single map (e.g., a splat map) commonly used in related technologies, and storing rendering display information corresponding to each of different types of landscape layers in each image color channel of each pixel in the two maps, the rendering display operation of a very complex landscape virtual screen can be simplified without being restricted by sampling, thereby avoiding the problem of the display operation of the landscape virtual screen becoming complicated due to an increase in the number of samplings caused by an increase in the number of landscape layers.
[0030] As an alternative embodiment, the method for displaying a landscape virtual screen may be applied to a landscape virtual screen display system in a hardware environment as shown in FIG. 2, but is not limited thereto. Wherein, the display of the landscape virtual screen may include, but is not limited to, display by a terminal device 202. A target application client (e.g., a game application client, a navigation application client, etc.) is executed in the terminal device 202. The terminal device 202 includes a human-machine interaction screen 2022, a processor 2024, and a memory 2026. The human-machine interaction screen 2022 is used to display an interface in a virtual scene provided by the target application client, for example, a landscape virtual screen to be displayed in the embodiment of the present application, and is further used to provide a human-machine interaction interface to receive a human-machine interaction operation performed on the human-machine interaction interface, and the processor 2024 is used to obtain a human-machine interaction command, for example, a rendering command for rendering the landscape virtual screen, in response to the human-machine interaction operation. The memory 2026 is used to store the landscape layer index map and weight map (e.g., in memory in the terminal device) and is further used to store the landscape virtual screen to be displayed (in a frame buffer in the terminal device).
[0031] The server 206 also includes a database 2062 and a processing engine 2064, where the database 2062 is used to store the landscape layer index map and the weight map, and the processing engine 2064 is used to look up and obtain the landscape layer index map and the weight map.
[0032] The specific process is as follows: Assume that a game application client is running on the terminal device 202, and the game application client uses the method provided in the embodiment of the present application to render and display a mountain path provided in the game virtual scene, as shown in Figure 2. The specific process is as follows: Steps S202-S212.
[0033] As in step S202, the terminal device 202 determines the target landscape area currently waiting to be displayed, and transmits the area identifier (ID) of the target landscape area to the server 206 via the network 204.
[0034] As in step S204, if the server 206 obtains a landscape layer index map corresponding to the target landscape area currently waiting to be displayed and a weight map that matches the landscape layer index map based on the area indicator, as in step S206, it returns the landscape layer index map and weight map to the terminal device 202 via the network 204.
[0035] The terminal device 202 executes steps S208-S210, performs a filter calculation for each set of pixel clusters in the weight map to skip protected pixels, obtains target display weights corresponding to pixels in the landscape layer index map, and performs screen rendering based on the landscape layer index map and the target display weights in the weight map, thereby realizing step S212, i.e., displaying a landscape virtual screen corresponding to the target landscape area.
[0036] Optionally, in this embodiment, the terminal device may be a terminal device on which a target client is located, and may include, but is not limited to, at least one of the following: a mobile phone (e.g., Android smartphone, iOS smartphone, etc.), a notebook computer, a tablet computer, a handheld computer, a MID (Mobile Internet Devices), a PAD, a desktop computer, a smart TV, etc. The target client may be an application client that needs to reproduce and display a landscape virtual screen, such as a game application client, a navigation application client, etc. The network may include, but is not limited to, a wired network or a wireless network, where the wired network includes a local area network, a metropolitan area network, and a wide area network, and the wireless network includes Bluetooth, WIFI, and other networks that can realize wireless communication. The server may be an independent server, a server group consisting of multiple servers, or a cloud server. Note that these are merely examples, and the embodiment is not limited to these.
[0037] Optionally, as shown in FIG. 3 as an optional embodiment, the method for displaying the landscape virtual screen includes the following steps:
[0038] S302: obtain a landscape layer index map corresponding to the currently displayed target landscape area and a weight map matched with the landscape layer index map, in which each pixel in each image color channel in the landscape layer index map is used to store an index value in the texture array of one landscape layer, a set of pixel clusters in each image color channel of the weight map correspondingly stores a display weight cluster of one landscape layer, the set of pixel clusters includes a reference pixel and a guard pixel matched with the reference pixel, the reference pixel is a pixel having a mapping relationship with a pixel in the landscape layer index map, and the guard pixel matched with the reference pixel has a position association relationship with the reference pixel; Landscape Layer , the display weight cluster includes target display weights corresponding to the reference pixels and reference weights corresponding to the guard pixels; S304: Performing a filter calculation for each set of pixel clusters in the weight map to skip the protected pixels and obtain a target display weight corresponding to the pixel in the landscape layer index map; S306: Display a landscape virtual screen corresponding to the target landscape area by performing screen rendering based on the landscape layer index map and the target display weights in the weight map.
[0039] Optionally, in this embodiment, the landscape virtual screen display method can be applied to processes that require rendering display on a virtual screen of a high-complexity landscape, but is not limited thereto. For example, for game applications with high virtual requirements, in order to improve the player's real experience in the virtual game scene, application developers often focus on highly restoring environmental elements in the virtual game scene, reproducing a real environment for the player, so as to make the player immerse in the game process. In addition, for example, for navigation applications of Augmented Reality (AR), environmental elements can also be highly restored on the navigation map so that the user can experience real environmental changes in the navigation process. However, these are merely examples, and the landscape virtual screen display method provided in this embodiment can also be applied to other application scenes, for example, when applied to an energy exploration platform application, different types of landscapes can be supported and displayed to improve the efficiency of exploration and mining, etc.
[0040] In addition, a landscape area is often a mixture of different landscape types, and in the case of such a highly complex landscape virtual screen, it is necessary to perform overlay calculations for the mixture ratio of different landscape types. To achieve the above-mentioned objective, in the embodiment of the present application, two maps, a landscape layer index map and a weight map, are adopted instead of a general-purpose map (such as a splat map) in the related art, and the information for rendering display corresponding to each of different types of landscape layers is stored according to each image color channel of each pixel in these two maps, thereby achieving the simplification of the rendering display operation of a highly complex landscape virtual screen and the effect of improving rendering efficiency.
[0041] Optionally, in this embodiment, the landscape layer index map (also called index map) is a map in which multiple image color channels, for example, four channels RGBA (Red, Green, Blue, Alpha), are set, and each pixel in each image color channel of the map stores an index value (hereinafter also called index) in the texture array of one landscape layer.
[0042] The texture array stores a series of texture data in the form of an array, and data can be accessed by index. For example, as shown in Figure 4, the texture array DemoArray = [snow, grass, mud, sludge, stone blocks, floor tiles, rubble, forest]. In this case, DemoArray[5] = floor tiles, and the array is indexed from 0, where 0 = snow, 1 = grass, 2 = mud, and the others can be inferred accordingly.
[0043] Optionally, in this embodiment, the weight map is a map with multiple image color channels, for example, RGBA (Red, Green, Blue, Alpha) channels, where a set of pixel clusters in each image color channel of the map stores a display weight cluster corresponding to one of the landscape layers.
[0044] It should be noted that there is a mapping relationship between a set of pixel clusters in the weight map and a pixel in the landscape layer index map, where the set of pixel clusters includes a reference pixel having a mapping relationship with a pixel in the landscape layer index map, and a guard pixel matched with the reference pixel. Here, the display weight cluster corresponding to the pixel cluster is a mixed weight of the landscape layer, specifically including a target display weight corresponding to the landscape layer indicated by the pixel in the landscape layer index map, which is stored in the reference pixel, and a reference weight stored in the guard pixel. Wherein, there is a position association relationship between the guard pixel and the reference pixel, and there is also an association relationship between the reference weight and the target display weight. Thus, the resolution of the weight map in this embodiment is Q times that of the landscape layer index map, where Q is determined based on the number of guard pixels associated with each reference pixel, and Q is an integer greater than 1.
[0045] For example, the landscape layer index map and the weight map can be represented as a grid map as shown in Fig. 5. Each grid (square) shown in Fig. 5 can correspond to one pixel in the landscape layer index map or one pixel in the weight map. Here, each grid can correspond to M x M display pixels, for example, 7 x 7 display pixels, in the landscape virtual screen. Note that this is only an example, and the present embodiment is not limited thereto.
[0046] In FIG. 5, the thick line (1) is used to represent one Landscape Actor (also called Landscape Actor), which contains all the landscape contents in one scene. In FIG. 5, the dotted line (2) divides the Landscape Actor to obtain four Landscape Components. Normally, during rendering, one Landscape Component submits one draw call. In other words, one Landscape Component is one rendering unit. The contents of different Landscape Components do not affect each other during rendering. For example, when one Landscape Component only renders snowy fields and another Landscape Component only renders grassy fields, the Landscape Component that renders grassy fields does not need to fully process the rendering resources (such as snowy field map resources) required to render snowy fields, and vice versa. In FIG. 5, the thick line (3) divides the Landscape Component to obtain four sections. Also in FIG. 5, each grid (4) is used to mark one quad, ie represents one pixel, and is used to perform fine positioning.
[0047] Optionally, in this embodiment, in the process of rendering a screen based on the landscape layer index map and the weight map, the graphics processing unit (GPU) as the executing entity has an automatic interpolation design, and when it performs rasterization processing, adjacent pixels can be interpolated to make a smooth transition (also called smooth transition), and a bilinear interpolation algorithm can be used, but is not limited to this. Assume that a coordinate system (abscissa is x and ordinate is y) is constructed in the source image to be processed. As shown in the figure, the bilinear interpolation algorithm first calculates the value of R1 by weighted average based on the values of Q11 (coordinate is (x1, y1)) and Q21 (coordinate is (x2, y1)), and then calculates the value of R2 by weighted average based on the values of Q12 (coordinate is (x1, y2)) and Q22 (coordinate is (x2, y2). Finally, the value of P point (coordinate is (x, y)) is calculated by weighted average using the values of R1 and R2. Here, the image quality after the interpolation processing is high, and no discontinuity in pixel values occurs.
[0048] However, after the GPU directly performs the actual interpolation according to the linear interpolation algorithm, the post-rendering effect may have a sawtooth area 702 as shown in FIG. 7, so the rendered landscape virtual screen may be distorted.
[0049] The cause of the sawtooth effect will be described with reference to FIG. 8. FIG. 8 shows a grid map corresponding to a weight map. As shown in FIG. 8(a), a first set of pixels filled with grid lines associated with reference pixel X0 is used to represent a landscape layer of grass, and as shown in FIG. 8(b), a second set of pixels filled with diagonal lines associated with reference pixel Y0 is used to represent a landscape layer of mud. These two landscape layers intersect, and if direct interpolation is performed between different landscape layers, an obviously unnatural transition boundary (indicating the location where the interpolation is wrong) may occur as shown in FIG. 8(c), resulting in the sawtooth effect during rendering. For example, Y0 is grass, that is, the weight of the muddy land of Y0 is 0, in this case, when the GPU performs the interpolation, the interpolation is performed at the midpoint between X0 and Y0, the weight of the muddy land is 0.5, and the corresponding weight of the grass is also 0.5. It makes no real sense to blend a muddy field with a weight of 0.5 with a grass field with a weight of 0.5, since the grass and muddy fields do not belong to the same type of field, so an unnatural transition will occur at this location, which may result in a sawtooth effect.
[0050] In order to overcome such a problem, in this embodiment, a protection pixel is set for the reference pixel in the weight map, where the positions of the protection pixel and the reference pixel may be symmetrical, but are not limited thereto, and the reference weight stored in the protection pixel may be a negative value of the target display weight stored in the reference pixel, but are not limited thereto. For example, the two landscape layers assumed above are still taken as an example for explanation. As shown in FIG. 9, a protection pixel X0' is set for the reference pixel X0, and a protection pixel Y0' is set for the reference pixel Y0. Wherein, for X0=[1], the landscape layer is grassland, and for X0'=[-1], the landscape layer is negative grassland. For Y0=[2], the landscape layer is muddy land, and for Y0'=[-2], the landscape layer is negative muddy land. Note that the explanation here is merely an example and has no practical meaning. When controlling the GPU to perform linear interpolation using this method, it is possible to take into consideration the protection elements as well as the overall effect, making it possible to avoid the obviously unnatural transition boundary as shown in Figure 8(c).
[0051] Specifically, the process will be described in conjunction with the process shown in FIG. 10. As shown in step S1002, a landscape layer index map is obtained by sampling, and as shown in step S1004, a weight map matching the landscape layer index map is obtained by sampling. Each image color channel of the landscape layer index map is used to store an index value (also called an index) of each landscape layer stored in the texture array, and stores an index Index corresponding to each landscape layer 1 to landscape layer 3 as shown in the figure. The display weight corresponding to each landscape layer and the reference weight of the associated protection pixel are stored corresponding to each image color channel of the weight map. For example, weight 1 corresponding to landscape layer 1 is stored in the weight map and the image color channel corresponding to its corresponding weighted landscape layer 1. Based on this, the weighted landscape layer 2 and the weighted landscape layer 3 are processed by analogy.
[0052] Then, as in steps S1006-S1008, the information is mixed, and rendering is performed according to the result of the mixing to obtain a rendering result, that is, a landscape virtual screen corresponding to the landscape area to be rendered.
[0053] Each pixel in each image color channel in the landscape layer index map is used to store an index value in the texture array of one landscape layer, for example, the R value (R image color channel) of the first pixel in the landscape layer index map may be 0 and the B value (B image color channel) may be 2. Each reference pixel in each image color channel in the weight map is used to store a target display weight, for example, the R value (R image color channel) of the first reference pixel in the weight map may be 50%, and the B value (B image color channel) may be 20%, so that when the terminal performs screen rendering, it determines the landscape layer corresponding to 0 based on the texture array, and also determines the landscape layer corresponding to 2, and then multiplies the landscape layer corresponding to 0 by its corresponding target display weight of 50% to obtain weighted landscape layer 1, and multiplies the landscape layer corresponding to 2 by its target display weight of 20% to obtain weighted landscape layer 2, and then mixes the weighted landscape layer 1 and the weighted landscape layer 2 to obtain a landscape virtual screen.
[0054] Note that the above-mentioned FIG. 10 is merely an example, and the embodiment of the present application is not limited thereto.
[0055] According to the embodiment provided in the present application, two maps, namely, a landscape layer index map and a weight map, are adopted instead of one general-purpose map in the related art, and the image color channels of each pixel in the two maps are used to store information for rendering display corresponding to different types of landscape layers, so that the rendering display operation for a very complicated landscape virtual screen can be simplified without being limited by sampling, thereby avoiding the problem that the display operation of the landscape virtual screen becomes complicated due to the increase in the number of sampling caused by the increase in the number of landscape layers.
[0056] As an optional scheme, obtaining a weight map matched to the landscape layer index map includes generating a weight map by determining, for each image color channel of the landscape layer index map, sequentially, a matched guard pixel on each direction of each pixel in the image color channel, and determining a reference weight corresponding to each of the guard pixels.
[0057] It should be noted that in this embodiment, the matched protection pixels in each direction of each pixel in the landscape index map include, but are not limited to, matched protection pixels in the positive direction of the pixel, such as matched protection pixels above, below, left and right. For example, as shown in FIG. 11, a protection pixel X0' is generated to the right of a reference pixel X0, a protection pixel X0" is generated below the reference pixel X0, a protection pixel Y0' is generated to the left of a reference pixel Y0, and a protection pixel Y0" is generated below the reference pixel Y0.
[0058] In addition, in this embodiment, the matched guard pixels in each direction of each pixel in the landscape index map further include, but are not limited to, matched guard pixels in the diagonal directions of the pixel, such as, but not limited to, the matched guard pixels in the upper right, upper left, lower right, and lower left. For example, assume that the weight map includes a reference pixel X0, a reference pixel Y0, a reference pixel Z0, and a reference pixel W0. Generate guard pixels X1 to X8 (X4-X8 are shown in FIG. 12) in each direction of the reference pixel X0, generate guard pixels Y1 to Y8 (Y4-Y8 are shown in FIG. 12) in each direction of the reference pixel Y0, generate guard pixels Z1 to Z8 (Z1 to Z8 are shown in FIG. 12) in each direction of the reference pixel Z0, and generate guard pixels W1 to W8 (W1 to W8 are shown in FIG. 12) in each direction of the reference pixel W0.
[0059] By generating the protection pixels, the GPU can perform linear interpolation using the protection pixels during subsequent screen rendering, so that the transition between landscape layers after linear interpolation and rendering can be smoother.
[0060] According to the embodiment provided in the present application, for the landscape layers corresponding to each image color channel of the landscape layer index map, the corresponding pixel cluster and display weight cluster in the weight map of each landscape layer are determined sequentially, so as to generate the weight map used for rendering.Then, the landscape layer index map and the weight map are used to render a high-complexity landscape virtual screen corresponding to the target landscape area, so as to avoid the problem that the number of sampling increases with the increase in the number of landscape layers, which makes the rendering display operation complicated, and the effect of improving the rendering efficiency can be achieved.
[0061] As an alternative scheme, determining a reference weight corresponding to each of the matched guard pixels on each direction of each pixel in the landscape layer index map in turn to generate the weight map includes repeatedly performing the following steps for each image color channel of the landscape layer index map in turn until each pixel in the landscape layer index map has been checked: S1: determining a current pixel pair (also referred to as a current pixel pair) from the landscape layer index map, where the current pixel pair includes a first current pixel and a second current pixel; and S2: Determine a first reference weight of a first protection pixel in a first direction of a first current pixel based on a linear interpolation algorithm, and determine a second reference weight of a second protection pixel in a second direction of a second current pixel, where the first direction and the second direction are relative (opposite) directions, and an average value between the target display weight of the first current pixel and the first reference weight of the first protection pixel is equal to an average value between the target display weight of the second current pixel and the second reference weight of the second protection pixel.
[0062] In addition, the current pixel pair may be a pixel pair in any one direction, and the following description will be given taking a pixel pair in one direction as an example. More specifically, the description will be given with reference to the example shown in FIG.
[0063] Assume that the reference pixels in the weight map corresponding to the landscape layer index map include a current pixel pair, i.e., reference pixel X0 (i.e., first current pixel) and reference pixel Y0 (i.e., second current pixel), and generate a protected pixel X0' to the right of the reference pixel X0 (i.e., in the first direction), and generate a protected pixel Y0' to the left of the reference pixel Y0 (i.e., in the second direction). The first current pixel is a sub-pixel of a pixel in the landscape layer index map. For example, when a pixel in the landscape layer index map corresponds to 7×7 display pixels in the landscape virtual screen, i.e., 7×7 pixels in the landscape texture map, the first current pixel may be one of the 7×7 pixels. Correspondingly, the second current pixel may also be one of the 7×7 pixels. As can be easily understood, when performing linear interpolation, the GPU can perform linear interpolation processing on all sub-pixels of each pixel in the landscape layer index map, i.e., perform linear interpolation processing on all pixels included in each quad.
[0064] Determine the reference weight of the protection pixel X0' (labeled as X0') and the reference weight of the protection pixel Y0' (labeled as Y0') based on a bilinear interpolation algorithm, and the formula may be as follows:
[0065]
number
[0066] In one embodiment, the method further includes: for each set of neighboring pixels of the plurality of sets of neighboring pixels in the landscape layer index map, determining a set of pixel clusters corresponding to first neighboring pixels in the current set of neighboring pixels and determining a set of pixel clusters corresponding to second neighboring pixels in the current set of neighboring pixels; determining the set of pixel clusters corresponding to the first neighboring pixels as a first pixel cluster and the set of pixel clusters corresponding to the second neighboring pixels as a second pixel cluster; performing linear interpolation on the current set of neighboring pixels according to the target display weights of the reference pixels in the first pixel cluster, the reference weights of the guard pixels in the first pixel cluster, the target display weights of the reference pixels in the second pixel cluster, and the reference weights of the guard pixels in the second pixel cluster to obtain transition weights; and performing smooth transition rendering on the current set of neighboring pixels according to the transition weights. Displaying a landscape virtual screen corresponding to the destination landscape area includes displaying a landscape virtual screen corresponding to the destination landscape area according to the screen rendering result and the smooth transition rendering result.
[0067] In the process of rendering a screen based on the landscape layer index map and the weight map, the graphics processing unit (GPU) as the executing entity has an automatic interpolation design, which can perform interpolation and smooth transition for adjacent pixels by linear interpolation during rasterization. For each set of adjacent pixels among the sets of adjacent pixels in the landscape layer index map, a set of pixel clusters corresponding to the first adjacent pixels in the current set of adjacent pixels is determined from the weight map, and the set of pixel clusters corresponding to the first adjacent pixels is the first pixel cluster, and a set of pixel clusters corresponding to the second adjacent pixels in the current set of adjacent pixels is determined from the weight map, and the set of pixel clusters corresponding to the second adjacent pixels is the second pixel cluster. Among them, the set of adjacent pixels may include the first adjacent pixel and the second adjacent pixel, for example, the first-order pixel and the second-order pixel in the landscape layer index map may be referred to as a set of adjacent pixels, and the first-order pixel may be the first adjacent pixel, and the second-order pixel may be the second adjacent pixel. Since there is a mapping relationship between the pixel in the landscape layer index map and a set of pixel clusters in the weight map, the GPU can determine the first pixel cluster and the second pixel cluster according to the mapping relationship. Furthermore, since both the first pixel cluster and the second pixel cluster may include a reference pixel and a protected pixel, when the GPU performs linear interpolation on the first adjacent pixel and the second adjacent pixel, the GPU can obtain a transition weight for rendering the connection area between the first adjacent pixel and the second adjacent pixel by performing an interpolation process based on the target display weight of the reference pixel and the reference weight of the protected pixel. Wherein, one pixel in the landscape layer index map is regarded as one quad, and one quad can correspond to 7×7 display pixels in the landscape virtual screen (texture map). For example, as shown in FIG. 11, a 7×7 grid in the weight map can correspond to one pixel in the landscape layer index map, that is, one quad.When X0=[1], the weight of the landscape layer being grass is 1, when X0'=[-1], the weight of the landscape layer being grass is -1, i.e., negative grass, when Y0=[2], the weight of the landscape layer being mud is 1, when Y0'=[-2], the weight of the landscape layer being mud is negative. When the GPU performs linear interpolation, it can first determine that X0 is grass and Y0 is mud. Y0 is muddy land, that is, the grass weight of Y0 is 0, so when GPU performs interpolation for X0, the grass weight of the middle part between X0 and Y0 is determined to be (1+0) / 2=0.5, when GPU performs interpolation for Y0, the muddy weight of the middle part between X0 and Y0 is determined to be (2+0) / 2=1, when GPU performs interpolation for X0', the grass weight of the middle part between X0 and Y0 is determined to be (-1+0) / 2=-0.5, when GPU performs interpolation for Y0', the muddy weight of the middle part between X0 and Y0 is determined to be (-2+0) / 2=-1, where 0.5, 1, -0.5 and -1 are all transition weights, X0 and Y0 are reference pixels, and X0' and Y0' are protection pixels.
[0068] Furthermore, when determining the transition weight, the GPU can perform rendering on the connection area between the first adjacent pixel and the second adjacent pixel according to the transition weight. For example, at the midpoint between X0 and Y0, a grass field with a transition weight of 0.5, a mud field with a transition weight of 1, a grass field with a transition weight of -0.5, and a mud field with a transition weight of -1 can be mixed to perform smooth transition rendering, thereby obtaining a smooth transition rendering result. The terminal integrates the screen rendering result and the smooth transition rendering result to display a landscape virtual screen corresponding to the target landscape area.
[0069] In one embodiment, since there may be multiple image color channels in the landscape layer index map, the developer can specify the image color channel for linear interpolation. For example, when the R channel of the first pixel in the landscape layer index map indicates grass and the B channel of the second pixel in the landscape layer index map indicates mud, the developer can specify that linear interpolation is to be performed on the R channel of the first pixel and the B channel of the second pixel in the landscape layer index map. In this way, the GPU can perform linear interpolation based on the target display weight and reference weight in the R channel of the first pixel cluster and the target display weight and reference weight in the B channel of the second pixel cluster in the weight map to perform a smooth transition between the grass and the mud.
[0070] The guard pixels allow for interpolation to be performed, ensuring the fidelity of the landscape virtual screen by providing a smooth transition to the landscape layers pointed to by adjacent pixels in the landscape layer index map.
[0071] Optionally, in one embodiment thereof, after determining the first reference weight of the first protection pixel on the first direction of the first current pixel and the second reference weight of the second protection pixel on the second direction of the second current pixel based on a linear interpolation algorithm, the method further includes the step of: S3: determining a third current pixel associated with the first current pixel and a fourth current pixel associated with the second current pixel in the landscape layer index map; and S4: determine a first diagonal reference weight of a first diagonal protection pixel on a first diagonal direction of a first current pixel based on a linear interpolation algorithm; determine a second diagonal reference weight of a second diagonal protection pixel on a second diagonal direction of a second current pixel based on a linear interpolation algorithm; determine a third diagonal reference weight of a third diagonal protection pixel on a third diagonal direction of a third current pixel based on a linear interpolation algorithm; determine a fourth diagonal reference weight of a fourth diagonal protection pixel on a fourth diagonal direction of a fourth current pixel based on a linear interpolation algorithm, in which an average value among the target display weight of the first current pixel, the target display weight of the second current pixel, the target display weight of the third current pixel, and the target display weight of the fourth current pixel is equal to an average value among the first diagonal reference weight, the second diagonal reference weight, the third diagonal reference weight, and the fourth diagonal reference weight.
[0072] A specific example will be described with reference to FIG.
[0073] Assume that the weight map includes reference pixel X0, reference pixel Y0, reference pixel Z0, and reference pixel W0. As shown in Fig. 13, a protected pixel X4 is generated to the right of reference pixel X0, a protected pixel X6 is generated below reference pixel X0, a protected pixel Y8 is generated to the left of reference pixel Y0, a protected pixel Y6 is generated below reference pixel Y0, a protected pixel Z4 is generated to the right of reference pixel Z0, a protected pixel Z2 is generated above reference pixel Z0, a protected pixel W8 is generated to the left of reference pixel W0, and a protected pixel W2 is generated above reference pixel W0.
[0074] Based on the above protection pixels, the reference weights corresponding to the four protection pixels X5, Y7, Z3 and W1 can be obtained. Because the protection pixels are finally folded, when the GPU analyzes any one actual pixel, it actually considers these protection pixels to be one value MidR. Here, by using the bilinear interpolation algorithm,
[0075]
number
[0076] That is, the value of MidR is the average value of the four reference pixels (X0, Y0, Z0, and W0). This means that when the GPU is made to interpolate at the position of MidR, the value obtained by the interpolation is MidR. Because there are protected pixels, MidR calculated by the GPU by interpolating in between corresponds to the center position of the four reference pixels. In other words, the center position shown in Figure 14 is MidR. AVG is a calculation to take the average value.
[0077] Furthermore, equation (5), i.e.,
[0078]
number
[0079]
number
[0080] The embodiment provided in the present application determines the guard pixels on each direction of the reference pixel, generates the weight map for rendering, and uses two maps, the landscape layer index map and the weight map, to improve the efficiency of rendering display. In addition, the guard pixels here are further used to support smooth transition, so as to ensure the authenticity of the landscape virtual screen.
[0081] As an alternative scheme, performing a filter calculation for each set of pixel clusters in the weight map to skip protected pixels and obtain target display weights corresponding to pixels in the landscape layer index map includes the following steps:
[0082] S1: compressing the weight map according to a target ratio, where the target ratio is determined based on a resolution ratio between the landscape layer index map and the weight map; and S2: Obtain a target mapping formula, input the display coordinates in the compressed weight map into the target mapping formula to perform calculations, skipping the protected pixels, and obtain the target display weights corresponding to the pixels in the landscape layer index map.
[0083] Since protected pixels are set in all directions corresponding to the reference pixels, the resolution of the weight map in which the protected pixels are stored is N times that of the landscape layer index map. For example, as shown in FIG. 13, the resolution of the weight map in which the protected pixels are stored is three times larger than that of the landscape layer index map. When the terminal performs screen rendering, the terminal performs compression processing on the weight map according to the target ratio, and inputs the display coordinates in the compressed weight map into the target mapping formula to perform calculations, thereby skipping the protected pixels and obtaining the target display weights corresponding to the pixels in the landscape layer index map. Among them, the display coordinates are used to indicate the positions of the pixels in the weight map before compression in the weight map after compression.
[0084] Since the protected pixels are only for the GPU hardware interpolation process, when rendering a screen by software, for example, when rendering a landscape layer pointed to by a pixel in the landscape index map, the protected pixels may be skipped and rendering may be performed based only on the reference pixels in the pixel cluster, for example, the screen is not rendered based on the reference weight of the protected pixels, but is rendered based only on the target display weight of the reference pixels in the weight map. In this way, it is possible to render each quad based on the reference pixels and perform smooth transition processing for adjacent quads based on the protected pixels, thereby further improving the realism of the landscape virtual screen.
[0085] Optionally, in one embodiment thereof, skipping the protected pixel and obtaining a target display weight corresponding to a pixel in the landscape layer index map by inputting the display coordinate in the compressed weight map into a target mapping formula for calculation includes obtaining a reference parameter value associated with the target ratio; performing a rounding operation (a process of taking an integer) on the display coordinate in the compressed weight map based on the reference parameter value to obtain a first intermediate value; performing a remainder operation (a process of taking a remainder) on the display coordinate in the compressed weight map based on the reference parameter value to obtain a second intermediate value; and determining a target display weight obtained after skipping the protected pixel based on the first intermediate value and the second intermediate value.
[0086] Note that the reference weight value in the protection pixel cannot be used in the final landscape calculation, so this value needs to be skipped when sampling the weight map. Optionally, in this embodiment, the resolution of the weight map is Q times the resolution of the landscape layer index map, and the reference parameter value here can be, but is not limited to, Q. In addition, the protection pixel can be skipped according to, but is not limited to, the following formula:
[0087]
number
[0088] In one embodiment, when rendering is performed by software, when three pixels a, b, and c are stored in the landscape layer index map and nine pixels a1, a2, a3, b1, b2, b3, c1, c2, and c3 are stored in the weight map, the terminal can simultaneously perform sampling on the landscape layer index map and the weight map, and perform screen rendering based on the sampling result. For example, at the first sampling, the terminal can determine the current sampling pixel a in the landscape layer index map, and determine the current sampling pixel a1 in the landscape layer index map by the target mapping formula, and perform screen rendering based on the landscape layer texture map pointed to by a1 and a. Furthermore, at the second sampling, the terminal can determine the current sampling pixel b in the landscape layer index map, and determine the current sampling pixel b1 in the landscape layer index map by the target mapping formula (skip two guard pixels a2 and a3 at this time), and perform screen rendering based on the landscape layer texture map pointed to by b1 and b. Based on this, similar processing can be performed until the entire target landscape area has all been successfully rendered.
[0089] After skipping the protected pixels of the weight map in the above manner, the processing result of the GPU will be a line graph as shown in FIG. 1, in which the abscissa values rise like vertical lines in some parts, and it appears that some Y values are skipped, and the skipped parts are the protected pixels.
[0090] The embodiment provided in this application allows for skipping of protected pixels in the weight map and obtaining a target display weight corresponding to a pixel in the landscape layer index map that is stored in the reference pixel, thereby avoiding interference of the protected pixels with the rendering display.
[0091] As an alternative scheme, obtaining a landscape layer index map corresponding to the currently-to-be-displayed target landscape region includes the following steps.
[0092] S1: Obtain a plurality of landscape layer types included in the target landscape area currently waiting to be displayed, and determine a type weight corresponding to each of the plurality of landscape types; and S2: Select at least one target landscape layer type whose corresponding type weight satisfies a predetermined condition from among multiple landscape layer types, obtain landscape layer index values corresponding to each of the selected at least one target landscape layer types, sequentially store the index values in each image color channel of a landscape layer index map, and obtain a landscape layer index map corresponding to the target landscape area currently waiting to be displayed, where the type weight value can be the weight value of the reference weight.
[0093] Among them, the predetermined condition may be freely set according to needs, for example, for some landscape areas with a large number of layers (e.g., roads), a landscape layer with a high sensing weight may be selected from among multiple landscape layer types preset for the target landscape area currently waiting to be displayed, taking into consideration the visual effect of human eyes. For example, as shown in FIG. 17, three values are stored in the landscape layer index map, and the three landscape layers with the highest weights (landscape layer Y of 59%, landscape layer X of 29%, landscape layer M of 10% as shown in the figure) are selected based on the weights occupied by the landscape layers, and their indexes (i.e., index values) are stored in the landscape layer index map.
[0094] Also, for example, a landscape layer type whose sensing weight is greater than a predetermined weight threshold may be randomly selected from among the multiple landscape layer types that are set, and an index value corresponding to the randomly selected landscape layer type may be stored in the landscape layer index map.
[0095] The embodiment provided in this application enables the selection of a landscape layer to ensure that only the landscape layers within the visible range of the human eye are stored in the landscape layer index map, rather than all landscape layer information, thereby avoiding resource waste and reducing the rendering load.
[0096] As a selectable scheme, selecting at least one target landscape layer type whose corresponding type weight satisfies a predetermined condition from among the multiple landscape layer types, and obtaining a landscape layer index value corresponding to each of the selected at least one target landscape layer type includes sorting the type weights of the multiple landscape layer types according to the magnitude of the type weights, and obtaining a landscape layer index value corresponding to each of the previous N landscape layer types based on the sorting result of the type weights.
[0097] The terminal determines a plurality of predetermined landscape layer types, determines a type weight corresponding to each landscape layer type, and sorts the plurality of landscape layer types according to the order of type weight from largest to smallest to obtain a sorting result. The terminal obtains the previous N landscape layer types according to the sorting result, and stores the index values of the obtained previous N landscape layer types in each image color channel of the landscape layer index map to obtain a landscape layer index map, where N can be freely set according to needs.
[0098] Although the above-mentioned embodiments of the methods are described as a combination of a series of operations for convenience of explanation, those skilled in the art can understand that the present invention is not limited to the order of operations described, because some steps may be performed in other orders or simultaneously according to the present invention. Also, those skilled in the art can understand that the embodiments described in the specification all belong to preferred embodiments, and the operations and modules involved are not necessarily essential to the present invention.
[0099] According to another aspect of the embodiment of the present invention, there is further provided a landscape virtual screen display device 1800 for performing the landscape virtual screen display method. As shown in Fig. 18, the device includes the following units:
[0100] 1) Acquisition unit 1802: used to acquire a landscape layer index map corresponding to a target landscape area currently waiting to be displayed and a weight map matched with the landscape layer index map, in which each pixel in each image color channel in the landscape layer index map is used to store an index value in the texture array of one landscape layer, a set of pixel clusters in each image color channel of the weight map correspondingly stores a display weight cluster of one landscape layer, the set of pixel clusters includes a reference pixel and a guard pixel matched with the reference pixel, the reference pixel is a pixel having a mapping relationship with a pixel in the landscape layer index map, and the guard pixel matched with the reference pixel has a position association relationship with the reference pixel; Landscape Layer , the display weight cluster includes target display weights corresponding to the reference pixels and reference weights corresponding to the guard pixels; 2) A calculation unit 1804: performs a filter calculation for each set of pixel clusters in the weight map, skipping the guard pixels, to obtain a target display weight corresponding to the pixel in the landscape layer index map; and 3) Display unit 1806: Used to display a landscape virtual screen corresponding to a target landscape region by performing screen rendering based on the landscape layer index map and the target display weights in the weight map.
[0101] In one embodiment thereof, the display unit 1806 further determines, for each set of adjacent pixels among the sets of adjacent pixels in the landscape layer index map, a set of pixel clusters corresponding to first adjacent pixels in the current set of adjacent pixels, and a set of pixel clusters corresponding to second adjacent pixels in the current set of adjacent pixels; the set of pixel clusters corresponding to the first adjacent pixels are the first pixel clusters, and the set of pixel clusters corresponding to the second adjacent pixels are the second pixel clusters; and performs a linear interpolation process on the current set of adjacent pixels to obtain transition weights according to the target display weights of the reference pixels in the first pixel cluster, the reference weights of the guard pixels in the first pixel cluster, the target display weights of the reference pixels in the second pixel cluster, and the reference weights of the guard pixels in the second pixel cluster; and uses the transition weights to perform smooth transition rendering on the current set of adjacent pixels.
[0102] In one embodiment thereof, the landscape virtual screen display device 1800 further includes a map generation module 1808, which is used to generate a weight map by sequentially determining, for each image color channel of the landscape layer index map, matching guard pixels on each direction of each pixel in the image color channel, and determining a reference weight corresponding to each of the guard pixels.
[0103] In one embodiment thereof, the protection pixels include a first protection pixel and a second protection pixel, the reference weight of the first protection pixel is a first reference weight, and the reference weight of the second protection pixel is a second reference weight, and the map generation module 1808 is further used for each image color channel of the landscape layer index map, sequentially, to repeatedly perform the following steps until each pixel in the landscape layer index map is checked: determine a current pixel pair from the landscape layer index map, where the current pixel pair includes a first current pixel and a second current pixel; and determine a first reference weight of the first protection pixel on a first direction of the first current pixel and a second reference weight of the second protection pixel on a second direction of the second current pixel based on a linear interpolation algorithm, where the first direction and the second direction are relative directions, and an average value between the target display weight of the first current pixel and the first reference weight of the first protection pixel and an average value between the target display weight of the second current pixel and the second reference weight of the second protection pixel are equal.
[0104] In one embodiment, the protection pixels further include a first diagonal protection pixel, a second diagonal protection pixel, a third diagonal protection pixel and a fourth diagonal protection pixel, a reference weight of the first diagonal protection pixel is a first diagonal reference weight, a reference weight of the second diagonal protection pixel is a second diagonal reference weight, a reference weight of the third diagonal protection pixel is a third diagonal reference weight, and a reference weight of the fourth diagonal protection pixel is a fourth diagonal reference weight, and the map generating module 1808 further determines a third current pixel associated with the first current pixel and a fourth current pixel associated with the second current pixel in the landscape layer index map; and a fourth current pixel associated with the second current pixel of the first diagonal protection pixel on the first diagonal direction of the first current pixel based on a linear interpolation algorithm. determining a first diagonal reference weight; determining a second diagonal reference weight of a second diagonal protection pixel on a second diagonal direction of a second current pixel based on a linear interpolation algorithm; determining a third diagonal reference weight of a third diagonal protection pixel on a third diagonal direction of a third current pixel based on a linear interpolation algorithm; determining a fourth diagonal reference weight of a fourth diagonal protection pixel on a fourth diagonal direction of a fourth current pixel based on a linear interpolation algorithm, wherein an average value among only the target display weight of the first current pixel, the target display weight of the second current pixel, the target display weight of the third current pixel, and the target display weight of the fourth current pixel is equal to an average value among the first diagonal reference weight, the second diagonal reference weight, the third diagonal reference weight, and the fourth diagonal reference weight.
[0105] In one embodiment, the display unit 1806 further performs a compression process on the weight map according to a target ratio, in which the target ratio is determined based on the resolution ratio between the landscape layer index map and the weight map; and obtains a target mapping formula, and inputs the display coordinates in the compressed weight map into the target mapping formula to perform calculations, which are used to skip the protected pixels and obtain the target display weights corresponding to the pixels in the landscape layer index map.
[0106] In one embodiment, the display unit 1806 is further used to obtain a reference parameter value associated with the target ratio; perform a rounding operation on the display coordinates in the compressed weight map based on the reference parameter value to obtain a first intermediate value; perform a remainder operation on the display coordinates in the compressed weight map based on the reference parameter value to obtain a second intermediate value; and determine a target display weight obtained after skipping the guard pixel based on the first intermediate value and the second intermediate value.
[0107] In one embodiment, the landscape virtual screen display device 1800 further obtains a plurality of landscape layer types included in the target landscape area currently waiting to be displayed, and determines a type weight corresponding to each of the plurality of landscape types; selects at least one target landscape layer type whose corresponding type weight satisfies a predetermined condition from the plurality of landscape layer types, and obtains a landscape layer index value corresponding to each of the selected at least one target landscape layer type; and sequentially stores the index values in each image color channel of a landscape layer index map, which is used to obtain a landscape layer index map corresponding to the target landscape area currently waiting to be displayed.
[0108] In one embodiment, the landscape virtual screen display device 1800 is further used to sort type weights according to the magnitude of the type weights of the multiple landscape layer types, and obtain landscape layer index values corresponding to each of the previous N landscape layer types based on the type weight sorting results.
[0109] This embodiment can be referred to the embodiment of the method described above, so a detailed description thereof will be omitted here.
[0110] According to yet another aspect of the embodiment of the present invention, there is further provided an electronic device for performing the method for displaying a landscape virtual screen, and the electronic device will be described by taking the terminal device shown in Fig. 1 as an example. As shown in Fig. 19, the electronic device includes a memory 1902 and a processor 1904, the memory 1902 stores a computer program, and the processor 1904 may be configured to execute steps in any one of the embodiments of the method according to the computer program.
[0111] Optionally, in this embodiment, the electronic device may be located in at least one network device of a plurality of network devices of a computer network.
[0112] Optionally, in this embodiment, the processor may be configured by a computer program to execute the following steps:
[0113] S1: obtain a landscape layer index map corresponding to a target landscape area currently waiting to be displayed and a weight map matched with the landscape layer index map, in which each pixel in each image color channel in the landscape layer index map is used to store an index value in the texture array of one landscape layer, a set of pixel clusters in each image color channel of the weight map correspondingly stores a display weight cluster of one landscape layer, the set of pixel clusters includes a reference pixel and a guard pixel matched with the reference pixel, the reference pixel is a pixel having a mapping relationship with a pixel in the landscape layer index map, and the guard pixel matched with the reference pixel has a position association relationship with the reference pixel; Landscape Layer , the display weight cluster includes target display weights corresponding to the reference pixels and reference weights corresponding to the guard pixels; S2: Perform a filter calculation for each set of pixel clusters in the weight map, skip the protection pixels, and obtain a target display weight corresponding to the pixel in the landscape layer index map; and S3: Display a landscape virtual screen corresponding to the target landscape region by performing screen rendering based on the landscape layer index map and the target display weights in the weight map.
[0114] Optionally, as can be understood by those skilled in the art, the configuration shown in FIG. 19 is merely exemplary, and the electronic device may be a terminal device such as a smartphone (e.g., Android, iOS smartphone, etc.), a tablet computer, a handheld computer, a MID (Mobile Internet Devices, MID), a PAD, etc. FIG. 19 does not limit the configuration of the electronic device. For example, the electronic device may include more or fewer components (e.g., network interfaces, etc.) than those shown in FIG. 19, or may have a different arrangement than those shown in FIG. 19.
[0115] The memory 1902 can store software programs and modules, such as program instructions / modules corresponding to the display method and device for a landscape virtual screen in an embodiment of the present invention, and the processor 1904 can execute the software programs and modules stored in the memory 1902 to realize various functional applications and data processing, such as the display method for the landscape virtual screen. The memory 1902 can include a high-speed random memory, and can also include a non-volatile memory, such as one or more magnetic memories, flash memories, or other non-volatile solid-state memories. In some embodiments, the memory 1902 can further include a memory that is remotely installed from the processor 1904, and these remote memories can be connected to the terminal through a network. Examples of the network include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof. The memory 1902 is specifically used to store information such as, but is not limited to, a landscape layer index map and a weight map. 19, the storage 1902 may include, but is not limited to, an acquisition unit 1802, a calculation unit 1804, and a display unit 1806 in the display device of the landscape virtual screen, and may further include other module units in the display device of the landscape virtual screen, but detailed description thereof will be omitted here.
[0116] Optionally, the transmission device 1906 is used to receive or transmit data over a network. Examples of the network may include wired and wireless networks. In one embodiment, the transmission device 1906 includes a Network Interface Controller (NIC), which can be connected to other network devices and routers via cables to communicate with the Internet or a local area network. In one embodiment, the transmission device 1906 is a Radio Frequency (RF) module, which is used to communicate with the Internet in a wireless manner.
[0117] The electronic device further includes a display 1908 and a connection bus 1910, the former being used for displaying the landscape virtual screen and the latter being used for connecting each modular component within the electronic device.
[0118] In another embodiment, the terminal device or server may be a node in a distributed system, where the distributed system may be a block chain system, and the block chain system may be a distributed system formed by the nodes connected in the form of network communication, whereby a P2P (Peer To Peer) network can be formed between the nodes, and any type of computing device, such as a server, terminal, or other electronic device, can join the P2P network to become a node in the block chain system.
[0119] According to one aspect of the present application, a computer program product or computer program is provided, the computer program product or computer program including computer instructions 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 to cause the computer device to perform the landscape virtual screen display method, wherein the computer program is configured to perform the steps of any one of the method embodiments when executed.
[0120] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0121] S1: obtain a landscape layer index map corresponding to a target landscape area currently waiting to be displayed and a weight map matched with the landscape layer index map, in which each pixel in each image color channel in the landscape layer index map is used to store an index value in the texture array of one landscape layer, a set of pixel clusters in each image color channel of the weight map correspondingly stores a display weight cluster of one landscape layer, the set of pixel clusters includes a reference pixel and a guard pixel matched with the reference pixel, the reference pixel is a pixel having a mapping relationship with a pixel in the landscape layer index map, and the guard pixel matched with the reference pixel has a position association relationship with the reference pixel; Landscape Layer ,wherein the display weight cluster includes target display weights corresponding to the reference pixels and reference weights corresponding to the guard pixels; S2: Perform a filter calculation for each set of pixel clusters in the weight map, skip the protection pixels, and obtain a target display weight corresponding to the pixel in the landscape layer index map; and S3: Display a landscape virtual screen corresponding to the target landscape region by performing screen rendering based on the landscape layer index map and the target display weights in the weight map.
[0122] Optionally, in this embodiment, as can be understood by those skilled in the art, all or some of the steps in the various methods of the above embodiments can be completed by a program instructing relevant hardware of a terminal device, and the program can be stored in a computer-readable storage medium, where the storage medium includes flash memory, ROM (Read-Only Memory), RAM (Random Access Memory), magnetic disk, optical disk, etc.
[0123] It should be noted that the sequence numbers of the embodiments of the present invention are for illustrative purposes only and do not represent the superiority or inferiority of the embodiments.
[0124] The units integrated in the above embodiments can be realized in the form of a software functional unit, and can be stored in the above computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention can be essentially embodied in the form of a software product, or a part of the technical solution, which is stored in a storage medium and includes a plurality of instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the above methods of each embodiment of the present invention.
[0125] In the above embodiments of the present invention, emphasis is placed on the description of each embodiment, and for parts not described in detail in one embodiment, reference may be made to the relevant descriptions of other embodiments.
[0126] In some embodiments provided in this application, it can be understood that the disclosed client can be realized in other ways. Among them, the above-mentioned device embodiment is merely an example, for example, the division of the units is a division of logical functions, and there may be other division ways in actual implementation, for example, multiple units or components may be combined or combined into another system, or some features may be omitted or not implemented. In addition, the coupling or direct coupling or communication connection between each other shown or described may be an indirect coupling or communication connection through some interfaces, units or modules, or may be in an electrical or other form.
[0127] The units described above as separate components may or may not be physically separate. Also, the components shown as units may or may not be physical units, i.e., they may be located in one place or distributed across multiple network units. Some or all of the units may be selected according to actual needs to achieve the objective of the technical solution of this embodiment.
[0128] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically alone, or two or more units may be integrated into one unit. The integrated units may be realized in the form of hardware or software functional units.
[0129] Although the preferred embodiment of the present application has been described above, the present application is not limited to this embodiment, and any modification to the present application falls within the technical scope of the present application as long as it does not depart from the spirit of the present application.
Claims
1. A method for displaying a landscape virtual screen, executed by a terminal, comprising the steps of: obtaining a landscape layer index map corresponding to a target landscape area currently waiting to be displayed, and obtaining a weight map matching the landscape layer index map, in which each pixel in each image color channel in the landscape layer index map is used to store an index value in a texture array of one landscape layer, a set of pixel clusters in each image color channel of the weight map stores display weight clusters of the one landscape layer, the set of pixel clusters includes a reference pixel and a guard pixel matched to the reference pixel, the reference pixel is a pixel having a mapping relationship with a pixel in the landscape layer index map, the guard pixel matched to the reference pixel is a pixel having a position association relationship with the reference pixel and representing the one landscape layer, and the display weight cluster includes a target display weight corresponding to the reference pixel and a reference weight corresponding to the guard pixel; performing a filter calculation for each set of the pixel clusters in the weight map, skipping the protection pixels, and obtaining the target display weights corresponding to pixels in the landscape layer index map; and performing screen rendering based on the landscape layer index map and the target display weights in the weight map to display a landscape virtual screen corresponding to the target landscape area; The method comprises: for each set of neighboring pixels in the landscape layer index map, determining a first pixel cluster corresponding to a first neighboring pixel in a current set of neighboring pixels and determining a second pixel cluster corresponding to a second neighboring pixel in the current set of neighboring pixels; performing a linear interpolation process on the neighboring pixels of the current set according to the target display weights of the reference pixels in the first pixel cluster, the reference weights of the protection pixels in the first pixel cluster, the target display weights of the reference pixels in the second pixel cluster, and the reference weights of the protection pixels in the second pixel cluster to obtain transition weights; and performing smooth transition rendering on the current set of neighboring pixels using the transition weights; The step of displaying a landscape virtual screen corresponding to the destination landscape area includes: The method includes displaying a landscape virtual screen corresponding to the target landscape area based on a screen rendering result and a smooth transition rendering result.
2. 2. The method of claim 1 , Prior to obtaining the weight map matched to the landscape layer index map, the method further comprises: The method further includes the steps of: for each image color channel of the landscape layer index map, sequentially determining matched guard pixels on each direction of each pixel in the image color channel, determining the reference weight corresponding to each of the guard pixels, and generating the weight map.
3. 3. The method of claim 2, The protection pixels include a first protection pixel and a second protection pixel, a reference weight of the first protection pixel is a first reference weight, and a reference weight of the second protection pixel is a second reference weight; The steps of sequentially determining, for each image color channel of the landscape layer index map, matched guard pixels on each direction of each pixel in the image color channel, determining the reference weight corresponding to each of the guard pixels, and generating the weight map include: For each image color channel of the landscape layer index map, the following steps are performed: determining a current pixel pair from the landscape layer index map, the current pixel pair including a first current pixel and a second current pixel; and determining a first reference weight of a first protection pixel on a first direction of the first current pixel and a second reference weight of a second protection pixel on a second direction of the second current pixel based on a linear interpolation algorithm, the first direction being opposite to the second direction, and an average value between the target display weight of the first current pixel and the first reference weight of the first protection pixel is equal to an average value between the target display weight of the second current pixel and the second reference weight of the second protection pixel; repeatedly performing sequentially until each pixel in the landscape layer index map has been checked.
4. 4. The method of claim 3, the protection pixels further include a first diagonal protection pixel, a second diagonal protection pixel, a third diagonal protection pixel and a fourth diagonal protection pixel, a reference weight of the first diagonal protection pixel is a first diagonal reference weight, a reference weight of the second diagonal protection pixel is a second diagonal reference weight, a reference weight of the third diagonal protection pixel is a third diagonal reference weight, and a reference weight of the fourth diagonal protection pixel is a fourth diagonal reference weight; The method further comprises: determining a third current pixel associated with the first current pixel and a fourth current pixel associated with the second current pixel in the landscape layer index map; determining a first diagonal reference weight of a first diagonal guard pixel on a first diagonal direction of the first current pixel according to the linear interpolation algorithm; determining a second diagonal reference weight of a second diagonal guard pixel on a second diagonal direction of the second current pixel according to the linear interpolation algorithm; determining a third diagonal reference weight of a third diagonal guard pixel on a third diagonal direction of the third current pixel based on the linear interpolation algorithm; and determining a fourth diagonal reference weight of a fourth diagonal guard pixel on a fourth diagonal direction of the fourth current pixel based on the linear interpolation algorithm, wherein an average value among a target display weight of the first current pixel, a target display weight of the second current pixel, a target display weight of the third current pixel, and a target display weight of the fourth current pixel is equal to an average value among the first diagonal reference weight, the second diagonal reference weight, the third diagonal reference weight, and the fourth diagonal reference weight.
5. 2. The method of claim 1 , performing a filter calculation for each set of pixel clusters in the weight map, skipping the protection pixels, and obtaining the target display weights corresponding to pixels in the landscape layer index map; compressing the weight map according to a target ratio, the target ratio being determined based on a resolution ratio between the landscape layer index map and the weight map; and The method includes the steps of obtaining a target mapping formula, inputting display coordinates in the weight map after compression into the target mapping formula to perform a calculation, skipping the protection pixels, and obtaining the target display weights corresponding to pixels in the landscape layer index map.
6. 6. The method of claim 5, inputting display coordinates in the compressed weight map into the target mapping formula to perform calculations to skip the protected pixels and obtain the target display weights corresponding to pixels in the landscape layer index map; obtaining a reference parameter value associated with said target ratio; performing a rounding process on the representation coordinate in the compressed weight map based on the reference parameter value to obtain a first intermediate value; performing a modulus operation on the representation coordinate in the compressed weight map based on the reference parameter value to obtain a second intermediate value; and determining the target display weight obtained after skipping the guard pixel based on the first intermediate value and the second intermediate value.
7. 2. The method of claim 1 , The step of obtaining a landscape layer index map corresponding to a currently pending target landscape region includes: obtaining a plurality of landscape layer types included in the currently waiting-to-be-displayed target landscape area, and determining a type weight corresponding to each of the plurality of landscape layer types; Selecting at least one target landscape layer type whose corresponding type weight satisfies a predetermined condition from the plurality of landscape layer types, and obtaining a landscape layer index value corresponding to each of the selected at least one target landscape layer type; and The method includes sequentially storing the index values in each image color channel of the landscape layer index map to obtain a landscape layer index map that corresponds to the target landscape region currently waiting to be displayed.
8. 8. The method of claim 7, The step of selecting at least one target landscape layer type whose corresponding type weight satisfies a predetermined condition from the plurality of landscape layer types and obtaining a landscape layer index value corresponding to each of the selected at least one target landscape layer type includes: The method includes a step of sorting type weights of the plurality of landscape layer types according to the magnitude of the type weights, and obtaining landscape layer index values corresponding to each of the previous N landscape layer types based on the sorting result of the type weights.
9. A device for displaying a landscape virtual screen, comprising: an acquisition unit for obtaining a landscape layer index map corresponding to a target landscape area currently waiting to be displayed and a weight map matching the landscape layer index map, in which each pixel in each image color channel in the landscape layer index map is used to store an index value in a texture array of one landscape layer, a set of pixel clusters in each image color channel of the weight map stores a display weight cluster of the one landscape layer, the set of pixel clusters includes a reference pixel and a guard pixel matched to the reference pixel, the reference pixel is a pixel having a mapping relationship with a pixel in the landscape layer index map, the guard pixel matched to the reference pixel is a pixel having a position association relationship with the reference pixel and representing the one landscape layer, and the display weight cluster includes a target display weight corresponding to the reference pixel and a reference weight corresponding to the guard pixel; a calculation unit for performing a filter calculation for each set of the pixel clusters in the weight map, skipping the protection pixels, and obtaining the target display weights corresponding to pixels in the landscape layer index map; and a display unit for performing screen rendering based on the landscape layer index map and the target display weights in the weight map to display a landscape virtual screen corresponding to the target landscape area; The display unit further comprises: For each set of neighboring pixels in the landscape layer index map, determine a set of pixel clusters corresponding to first neighboring pixels in a current set of neighboring pixels and a set of pixel clusters corresponding to second neighboring pixels in the current set of neighboring pixels; a set of pixel clusters corresponding to the first adjacent pixels as a first pixel cluster, and a set of pixel clusters corresponding to the second adjacent pixels as a second pixel cluster; According to the target display weights of the reference pixels in the first pixel cluster, the reference weights of the protection pixels in the first pixel cluster, the target display weights of the reference pixels in the second pixel cluster, and the reference weights of the protection pixels in the second pixel cluster, perform a linear interpolation process on the neighboring pixels of the current set to obtain transition weights; performing smooth transition rendering for the current set of neighboring pixels according to the transition weights; and An apparatus used for displaying a landscape virtual screen corresponding to the target landscape region based on a screen rendering result and a smooth transition rendering result.
10. 10. The apparatus of claim 9, Further comprising a map generation module; The map generation module is used to sequentially determine, for each image color channel of the landscape layer index map, matched guard pixels on each direction of each pixel in the image color channel, determine the reference weight corresponding to each of the guard pixels, and generate the weight map.
11. 11. The apparatus of claim 10, The protection pixels include a first protection pixel and a second protection pixel, a reference weight of the first protection pixel is a first reference weight, and a reference weight of the second protection pixel is a second reference weight; The map generation module further comprises: For each image color channel of the landscape layer index map, the following steps are performed: determining a current pixel pair from the landscape layer index map, the current pixel pair including a first current pixel and a second current pixel; and determining a first reference weight of a first protection pixel on a first direction of the first current pixel and a second reference weight of a second protection pixel on a second direction of the second current pixel based on a linear interpolation algorithm, the first direction being opposite to the second direction, and an average value between the target display weight of the first current pixel and the first reference weight of the first protection pixel is equal to an average value between the target display weight of the second current pixel and the second reference weight of the second protection pixel; in sequence repeatedly until each pixel in the landscape layer index map has been checked.
12. 12. The apparatus of claim 11, the protection pixels further include a first diagonal protection pixel, a second diagonal protection pixel, a third diagonal protection pixel and a fourth diagonal protection pixel, a reference weight of the first diagonal protection pixel is a first diagonal reference weight, a reference weight of the second diagonal protection pixel is a second diagonal reference weight, a reference weight of the third diagonal protection pixel is a third diagonal reference weight, and a reference weight of the fourth diagonal protection pixel is a fourth diagonal reference weight; The map generation module further comprises: determining a third current pixel associated with the first current pixel and a fourth current pixel associated with the second current pixel in the landscape layer index map; determining a first diagonal reference weight of a first diagonal guard pixel on a first diagonal direction of the first current pixel according to the linear interpolation algorithm; determining a second diagonal reference weight of a second diagonal guard pixel on a second diagonal direction of the second current pixel according to the linear interpolation algorithm; determining a third diagonal reference weight of a third diagonal guard pixel on a third diagonal direction of the third current pixel based on the linear interpolation algorithm; and determining a fourth diagonal reference weight of a fourth diagonal guard pixel on a fourth diagonal direction of the fourth current pixel according to the linear interpolation algorithm; An apparatus, wherein an average value among the target display weight of the first current pixel, the target display weight of the second current pixel, the target display weight of the third current pixel, and the target display weight of the fourth current pixel is equal to an average value among the first diagonal reference weight, the second diagonal reference weight, the third diagonal reference weight, and the fourth diagonal reference weight.
13. 10. The apparatus of claim 9, The display unit further comprises: compressing the weight map according to a target ratio, the target ratio being determined based on a resolution ratio between the landscape layer index map and the weight map; and The apparatus is used to obtain a target mapping formula, input display coordinates in the weight map after compression into the target mapping formula to perform calculations, skip the protection pixels, and obtain the target display weights corresponding to pixels in the landscape layer index map.
14. 14. The apparatus of claim 13, The display unit further comprises: obtaining a reference parameter value associated with said target ratio; perform a rounding process on the display coordinates in the compressed weight map based on the reference parameter value to obtain a first intermediate value; performing a modulus operation on the representation coordinate in the compressed weight map based on the reference parameter value to obtain a second intermediate value; and The apparatus is adapted to determine the target display weight obtained after skipping the guard pixel based on the first intermediate value and the second intermediate value.
15. 10. The apparatus of claim 9, The apparatus further comprises: Obtaining a plurality of landscape layer types included in the currently waiting-to-be-displayed target landscape area, and determining a type weight corresponding to each landscape layer type among the plurality of landscape layer types; Selecting at least one target landscape layer type from the plurality of landscape layer types, the corresponding type weight of which satisfies a predetermined condition, and obtaining a landscape layer index value corresponding to each of the selected at least one target landscape layer type; and The apparatus is used to sequentially store the index values into each image color channel of the landscape layer index map to obtain a landscape layer index map corresponding to the target landscape region currently waiting to be displayed.
16. A program for causing a computer to execute the method according to any one of claims 1 to 8.
17. 1. An electronic device comprising: a memory; and one or more processors coupled to the memory, The storage device stores a computer program, An electronic device, wherein the processor is configured to execute the computer program to implement the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Image processor, image processing method and record medium
JP2006263479A
Image processor
JP2015184854A
Computer graphics method for terrain rendering
US20200143589A1
