Picture display method and device, computing equipment and computer readable storage medium
By cutting the target scenarios in the image processor and determining the resolution, combined with the rendering processing of the central processor, the problem of low game screen display efficiency and difficulty in memory management in existing technologies have been solved. More stable memory use.
Patent Information
- Application Number
- CN202411420338.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2025-01-21
AI Technical Summary
The prior art is less efficient in the display process of game screens and it is difficult to effectively manage the memory required for non-streaming texture maps, resulting in poor memory usage stability and affecting the display effect of the screen.
By cropping the target scene in the image processor, the target object to be displayed is determined, and its reference resolution information is determined based on the distance between the target object and the virtual camera. Then, based on this information, the target map is loaded in the central processor and the target object is rendered to achieve screen display.
It improves the screen display efficiency and effect, reduces the consumption of computing resources, avoids additional memory usage, and improves the stability of memory usage.
Smart Images

Figure CN119327107A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present specification relate to the field of computer technology, and more particularly to a screen display method and apparatus, a computing device, a computer-readable storage medium, and a computer program product. Background Art
[0002] With the development of computer technology, various game programs emerge in an endless stream. During the running of the game programs, the game screen needs to be displayed in real time, and the display effect of the game screen is required to be high.
[0003] In the related art, maps of different resolution levels are pre-generated for each object in the game scene to ensure that each object can be rendered using a map of an appropriate resolution level when the game scene is displayed based on different viewing angles. The central processing unit (CPU) of the display device sets a renderer for each object in the game scene to be responsible for rendering the corresponding object. In the process of displaying the game screen, the display device uses each renderer in turn to determine the resolution level of the map required for the corresponding object in the game scene at the current viewing angle, and then loads the map of the corresponding resolution level to render each object to be displayed in the game scene, thereby displaying the game screen.
[0004] However, the display efficiency of the game screen in this method is low, and the screen display effect still needs to be improved. Summary of the invention
[0005] The embodiments of this specification provide a screen display method, which can improve the efficiency and effect of screen display. One or more embodiments of this specification also relate to a screen display device, a computing device, a computer-readable storage medium and a computer program product.
[0006] According to one aspect of an embodiment of this specification, a screen display method is provided, the method comprising: For a target screen to be displayed, a target scene is cropped in an image processor to determine target objects in the target scene to be displayed in the target screen; Determining reference resolution information corresponding to each target object in the image processor based on the target distance of each target object; wherein the target distance of the target object is the distance between the target object and a virtual camera corresponding to the target screen, and the reference resolution information indicates the resolution of the map required to display the target object; The target texture of each target object is loaded in the central processing unit based on the reference resolution information, and each target object is rendered based on the loaded target texture to display the target screen.
[0007] According to another aspect of the embodiments of this specification, there is provided a screen display device, including: A cropping module, for cropping a target scene in an image processor for a target screen to be displayed, and determining target objects in the target scene to be displayed in the target screen; A first determination module is used to determine, in the image processor, reference resolution information corresponding to each target object based on a target distance of each target object; wherein the target distance of the target object is a distance between the target object and a virtual camera corresponding to the target screen, and the reference resolution information indicates a resolution of a texture required to display the target object; The loading module is used to load the target texture of each target object in the central processing unit based on the reference resolution information, and render each target object based on the loaded target texture to display the target picture.
[0008] According to another aspect of the embodiments of this specification, there is provided a computing device, including: a memory and a processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the above method are implemented.
[0009] According to another aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores a computer program / instruction, and the steps of the above method are implemented when the computer program / instruction is executed by a processor.
[0010] According to another aspect of the embodiments of this specification, a computer program product is provided, including a computer program / instruction, and when the computer program / instruction in the computer program product is executed in a processor, the steps of the above method are implemented.
[0011] In one embodiment of the present specification, for the target screen to be displayed, the target scene can be cropped in the image processor to eliminate the objects that do not need to be displayed in the target scene, and determine the target objects to be displayed; and then determine the corresponding reference resolution information only for each target object based on the distance between it and the virtual camera. In this way, the resolution information can be determined only for a small number of objects in the target scene, reducing the consumption of computing resources and ensuring a faster computing speed. Since multiple threads can be used in the image processor for parallel processing, the reference resolution information can be determined in parallel for each target object to improve processing efficiency. Accordingly, it can be ensured that the central processing unit renders each target object faster, improving the efficiency and effect of the screen display. And the central processing unit only loads the texture corresponding to the target object to be displayed, which can avoid additional memory usage. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 is a flow chart of a screen display method provided by an embodiment of this specification; Figure 2 It is a schematic diagram for combining target distance and resolution information comparison; Figure 3 It is a simplified flow chart of a screen display method provided in an embodiment of this specification; Figure 4 It is a structural schematic diagram of a picture display device provided in an embodiment of this specification; Figure 5 It is a structural block diagram of a computing device provided in an embodiment of this specification. DETAILED DESCRIPTION
[0013] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.
[0014] The terms used in one or more embodiments of this specification are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of this specification. The singular forms of "one", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items. The term "at least one" in one or more embodiments of this specification refers to "one or more", and "multiple" refers to "two or more". The term "including" is an open description and should be understood as "including but not limited to", and may include other content on the basis of the content already described.
[0015] It should be understood that although the terms "first", "second", etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, "first" may also be referred to as "second", and similarly, "second" may also be referred to as "first". Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0016] In addition, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant standards and requirements, and corresponding operation entrances shall be provided for users to choose to authorize or refuse.
[0017] At present, the requirements for the display effects of various pictures are getting higher and higher. For example, when running a 3D game program, the computing device needs to display a more realistic game screen, and it needs to ensure that the display efficiency of the game screen is high, avoid excessive memory usage by the screen display, and avoid affecting the smoothness of the game operation.
[0018] Usually before rendering the screen, multiple object models are created, and texture maps of multiple resolution levels are generated for each object model. For example, a texture map with a resolution of 1024×1024 can be generated for each object model. Based on this texture map, a texture map with a resolution of 512×512, a texture map with a resolution of 256×256, and texture maps with more resolutions can be obtained. The texture maps of these multiple resolution levels correspond to different mip levels, and the mip level refers to the texture level of different resolutions in the multi-level progressive texture (mip mapping) technology. The larger the mip level, the lower the corresponding resolution. For each frame of the game screen, the computing device needs to render the objects to be displayed in the game screen based on the maps of each object model in the game scene to realize the display of the game screen.
[0019] When the perspective of the game screen and the position of the virtual camera change, the object that should be displayed in the game screen can be rendered at a suitable mip level among the mip levels corresponding to the model of the object, so as to improve rendering efficiency and image quality. For example, for objects that are far from the virtual camera, the mip level corresponding to the lower resolution can be used for rendering; for objects that are close to the virtual camera, the mip level corresponding to the higher resolution can be used for rendering.
[0020] If all texture maps are stored for each object model, this large number of high-resolution texture maps will occupy a large amount of video memory (VRAM) of the computing device, which will have a certain impact on the screen display performance of the computing device. At present, computing devices can have a texture streaming function, which can dynamically stream and load and unload the texture maps of each object model required for the current screen according to the corresponding viewing distance (that is, the distance between the virtual camera) and rendering requirements of each object in the screen to be displayed, so as to optimize the use of video memory. This function is implemented in the central processing unit (CPU) of the computing device. A renderer is set for each object model in the CPU, and the renderer is used to control the loading and unloading of the mip level of the corresponding object model. This function saves a large amount of potential image processing unit (GPU) memory by consuming a small amount of CPU resources. However, the performance of screen rendering based on the renderer in the CPU of the computing device is poor, and it is easy to load too many unnecessary texture maps of the object model, resulting in memory occupation, and the calculation efficiency of the mip level required for each object model is low, which will affect the screen display efficiency to a certain extent.
[0021] The texture streaming function can also set a memory threshold for all texture maps used in rendering the screen, so as to adjust the mip level used for screen rendering based on the memory threshold to ensure that the memory threshold is not exceeded. However, when the computing device renders the screen, in addition to the texture maps loaded based on the texture streaming method, it is also necessary to load some non-streaming texture maps (nonStreamingTexture), such as the user interface (UI) opened in the computing device needs to use non-streaming texture maps for rendering and display. The set memory threshold includes the memory occupied by these non-streaming texture maps. The size of the non-streaming texture maps required at each moment fluctuates greatly and is related to user behavior. It is difficult to accurately evaluate in advance, so the configuration of the memory threshold is difficult. If the memory threshold is configured too large, it will cause idle waste of the remaining memory; if the memory threshold is configured too small, in some cases the memory occupied by the non-streaming texture maps will exceed the memory threshold, resulting in no memory reserved for the texture maps of the object model, which will cause the problem that all objects displayed on the screen are blurred. Therefore, it is difficult to effectively manage the fluctuation of memory required for non-streaming texture mapping in traditional solutions, resulting in poor stability of memory usage and affecting the display effect of the picture.
[0022] The embodiments of this specification provide a screen display method, which can improve the screen display effect and efficiency, and can also reduce the configuration difficulty of the memory threshold, avoid memory waste, and improve the stability of memory usage during the screen display process. The embodiments of this specification also relate to a screen display device, a computing device, a computer-readable storage medium, and a computer program product, which will be described in detail one by one in the following embodiments. The screen display method can be applied to the screen display device and the computing device, and the screen display device and the computing device can be terminal devices with information processing functions and display functions, such as smart phones, desktop computers, laptops, tablet computers, virtual reality display devices or augmented reality display devices.
[0023] Figure 1 FIG. 1 is a flowchart of a screen display method provided by an embodiment of the present specification, and the method can be applied to a screen display device. Figure 1 As shown, the screen display method includes the following steps: Step 102: For the target screen to be displayed, the target scene is cropped in the image processor to determine each target object in the target scene to be displayed in the target screen.
[0024] The target picture can be any frame of the picture to be displayed by the picture display device. The embodiment of this specification describes the process that needs to be executed when the picture display device displays the target picture. For each frame of the picture to be displayed, the picture display device can execute the same process to realize the picture display. The target picture corresponds to the target scene, and the target scene includes multiple objects located at different positions. The target picture is an image of all or part of the area in the target scene. Each object in the target scene corresponds to a pre-generated object model, which can be a three-dimensional model. Based on the object model, the display information of the corresponding object (such as shape, size, material, color, texture, etc.) can be determined, and then based on this information, the display of each object can be realized to form a corresponding picture.
[0025] A target application may be installed in the screen display device, such as a game program, an animation generation program, a video generation program, or other program that needs to display multiple screens in sequence. During the operation of the target application, the screen can be displayed for the target scene, such as the screens displayed at different times can correspond to different areas or different perspectives in the target scene. Taking the game program as an example, the game scene needs to be displayed during the operation of the game program, such as the game scene can be a city scene, a rural scene, or a wild scene, and the game scene can include game characters, buildings, trees, mountains, and other objects. The screen display device can execute the screen display method provided in the embodiment of this specification during the operation of the game program to display the game screen. The target screen can be any frame of the game screen, and the game screen needs to change accordingly with the operation of the game player.
[0026] In the embodiments of this specification, the screen display device uses a GPU-driven rendering pipeline to render the screen. The GPU-driven rendering pipeline can realize scene clipping and corresponding rendering in the GPU, and the GPU rendering pipeline supports a richer scene clipping method, and can use a suitable scene clipping method to clip the scene under different display requirements. In addition, various computing processes in the GPU can be executed in parallel to improve information processing efficiency.
[0027] The screen display device can first perform cropping processing on the target scene corresponding to the target screen based on the display requirements of the target screen using the GPU-driven rendering pipeline to remove the part of the target scene that does not need to be displayed in the target screen, and the objects in the remaining part are the target objects to be displayed in the target screen. The GPU-driven rendering pipeline supports multiple cropping of the scene, and the cropping methods are relatively rich.
[0028] For example, at least one of frustum cropping, proportion cropping and occlusion cropping can be performed on any scene in the GPU. The frustum defines the three-dimensional space area visible from the camera's perspective. To perform frustum cropping on a scene is to retain the part of the scene inside the frustum and remove the part outside the frustum based on the information of the frustum. Proportion cropping is cropping according to a certain ratio so that the ratio of the cropped scene matches the set ratio. The ratio can be the aspect ratio of the screen, or other set ratio. Occlusion cropping is to determine the occlusion relationship between objects in the scene according to a certain perspective, and then remove the occluded part. For the part that is removed during cropping, there is no need to obtain the information of this part, and there is no need to display this part when displaying.
[0029] In the embodiment of the present specification, in step 102, the image display device may perform at least one of visual cone cropping, proportion cropping and occlusion cropping on the target scene based on the target image, and the three cropping processing methods may be used simultaneously. Accordingly, step 102 may include: based on the field of view corresponding to the target image to be displayed, performing visual cone cropping on the target scene in the image processor to eliminate objects outside the field of view in the target scene; and / or, based on the screen display size corresponding to the target image to be displayed, performing proportion cropping on the target scene in the image processor to make the size of the cropped target scene proportional to the screen display size; and / or, for the viewing angle corresponding to the target image to be displayed, performing occlusion cropping on the target scene in the image processor to eliminate objects in the target scene that are blocked by other objects under the viewing angle.
[0030] By cropping the target scene, the screen display device can determine all objects that have not been eliminated after cropping, and these objects need to be displayed in the target screen. Each object can correspond to an object model, or there may be multiple objects corresponding to the same object model. In the target scene, an object model may be set in multiple positions to obtain multiple objects. For example, in a game scene, a tree model can be set in multiple positions to display multiple trees to achieve a forest effect. At this time, these trees all correspond to the same tree model. The screen display device can display the target screen based on the relevant information of the object that has not been eliminated after cropping.
[0031] In this specification, by cutting the target scene, each target object in the target scene can be determined. The screen display device can obtain relevant information of the object model corresponding to each target object to display the target screen based on this information. There are two ways to define the target object, and there will be certain differences in the calculation process used when realizing the screen display under the two definition methods. In one definition method, regardless of whether the object models corresponding to each object are the same, the objects located at different positions in the target scene that need to be displayed in the target screen are considered to be different target objects. In another definition method, different target objects are used to describe different object models, and multiple objects corresponding to the same object model but located at different positions in the target scene are considered to be multiple displays of a target object at different positions. In this definition method, determining the target object to be displayed in the target screen is equivalent to determining the object model needed to be used in the display process of the target screen.
[0032] Step 104: Determine reference resolution information corresponding to each target object based on the target distance of each target object in the image processor; wherein the target distance of the target object is the distance between the target object and the virtual camera corresponding to the target screen, and the reference resolution information indicates the resolution of the map required to display the target object.
[0033] The picture to be displayed by the picture display device can be determined based on the position of the virtual camera, and the position of the virtual camera can refer to the position of the virtual camera relative to the target scene. For each frame of the target picture to be displayed, the position of the corresponding virtual camera can be obtained. The position of the virtual camera can be adjusted based on user operations, such as adjusting the position of the virtual camera relative to the target scene based on the player's operation in the game scene (such as the movement of the player's game character in the game scene, or the position setting of the virtual camera), and accordingly, the adjusted viewing angle and the target picture to be displayed under the viewing angle can be determined.
[0034] After the screen display device determines the target objects to be displayed on the target screen in the target scene, it can determine the distance between each target object and the virtual camera to obtain the target distance of each target object. When different objects corresponding to the same object model are considered to be the same target object, the target distance of the target object can refer to the minimum distance between the target object and the virtual camera at each position. For example, trees are set at the three positions A, B and C in the target scene, and the trees at the three positions correspond to the same tree model, then the trees at the three positions can be considered to be a target object corresponding to the tree model (such as called a target tree). The target distance of the target tree can be the minimum distance of the three distances between the target tree and the virtual camera obtained when the target tree is at the three positions.
[0035] In the embodiments of this specification, the resolutions required for displaying objects at different distances from the virtual camera may also be different. For example, objects close to the virtual camera need to be displayed at a higher resolution, and objects far from the virtual camera need to be displayed at a lower resolution, so as to reflect the effect that the content in the picture gradually blurs from near to far, and ensure that the display of the picture matches the human visual perception of the real scene. The picture display device can determine the resolution required for displaying each target object corresponding to the target picture, so as to display each target object accordingly based on the resolution.
[0036] In the embodiments of this specification, maps of multiple resolutions are pre-generated for each object model, and the map may refer to a texture map. For any object model, the object model can be displayed by displaying its corresponding map, and a map of appropriate resolution can be selected for display according to the display requirements. Maps of each resolution can correspond to a mip level, and the size of the resolution can be negatively correlated with the value of the mip level, that is, the resolution of maps with lower mip levels is larger. For example, the resolution of a map with a mip level of 1 is 1024×1024, and the resolution of a map with a mip level of 2 is 512×512. The number of maps generated for different object models and the corresponding resolution size can be the same. Optionally, the number of maps of each resolution generated for different object models can be different, and the resolution of each corresponding map can also be different. For example, one object model corresponds to three textures of different resolutions, and the resolution of the texture with mip level 1 is 512×512; another object model corresponds to four textures of different resolutions, and the resolution of the texture with mip level 1 is 1024×1024.
[0037] The screen display device can determine the reference resolution information corresponding to each target object based on the target distance of each target object, and the reference resolution information of each target object indicates the resolution of the map required to display the target object in the target screen. The resolution indicated by the reference resolution information is negatively correlated with the corresponding target distance. The resolutions corresponding to different target distances may be different, or there may be a certain range of target distances corresponding to the same resolution. For example, the reference resolution information may include a resolution level, such as a mip level. If the objects at different positions in the target scene are all different target objects, the reference resolution corresponding to each target object indicates the resolution of the map required for the display of this target object. If the objects at different positions in the target scene are the same target object, the reference resolution corresponding to the target object indicates the maximum resolution of the map required to display the target object at each position. In the embodiment of this specification, the reference resolution information is determined in the GPU, and there are multiple threads in the GPU, which can calculate the corresponding reference resolution information in parallel for each object in the target scene.
[0038] In some embodiments, the step 104 in which the reference resolution information corresponding to each target object is determined in the image processor based on the target distance of each target object includes: determining the reference resolution information corresponding to the target object in the image processor for any target object based on the target distance of the target object, the texture mapping relationship of the target object, the field of view information corresponding to the target screen, and the texel information corresponding to the target object. The texture mapping relationship indicates the mapping relationship between the model of the target object (i.e., the object model corresponding to the target object) and the texture of the target object.
[0039] For each object model, the texture mapping relationship can be calculated offline, such as when generating multiple resolutions of textures for it. The texture mapping relationship can be the UV distribution metric of the object model. "UV" is the abbreviation of uv texture map coordinates, which defines the coordinates of each point on the map. Each vertex in the object model will correspond to a point in the texture map, and accordingly each triangle in the object model will correspond to a triangle in the texture map. The corresponding area ratio can be calculated for each group of corresponding triangles, and then the average area ratio of each group of triangles can be calculated, and the UV distribution metric can be determined based on the average area ratio. The screen display device can traverse each object model, obtain the mesh information included in each object model, calculate the UV distribution metric based on the triangle area and UV value range in the mesh, and serialize the obtained UV distribution metric to the corresponding object model.
[0040] The field of view information corresponding to the target screen may include information such as the field of view (FOV) or focal length, and the corresponding field of view information may be obtained based on the target screen to be displayed. The texel information corresponding to the target object may include the texel size of the highest resolution texture corresponding to the target object, such as 1024×1024.
[0041] For example, the screen display device can use the following formula in the GPU to determine the reference resolution information of each target object, such as determining the mip level expected to be loaded for each target object. The formula can be: MipLevel=0.5f×log2((T×D) / (U×F)), where f represents a floating point number, T represents the texel size, D represents the target distance, U represents the UV distribution metric value, and F represents the field of view information. The field of view information F in the formula can be the square of the distance from the virtual camera to the screen, and the distance from the camera to the screen can be the focal length of the virtual camera.
[0042] Step 106: Load the target texture of each target object in the central processing unit based on the reference resolution information, and render each target object based on the loaded target texture to display the target picture.
[0043] After the screen display device obtains the reference resolution information of each target object from the GPU, the CPU reads back the reference resolution information generated by the GPU, and determines the target texture required for rendering each target object based on the reference resolution information; then, the target texture of each target object is loaded into the memory from the storage space of the texture corresponding to each object model, so as to be used when displaying the screen. The screen display device can display the texture of the corresponding resolution of each object in the area corresponding to the object on the screen to achieve rendering of the object.
[0044] Multiple objects in the target scene that correspond to the same object model but are in different positions may need to use maps of different resolutions when rendering. When the multiple objects are considered to be different target objects, the target map of the target object is the map of the resolution required for the display of the object. Only one map needs to be loaded for one target object, and then it can be rendered at the corresponding position on the screen. When the multiple objects are considered to be the same target object, the target map of the target object may include multiple maps of different resolutions, such as all maps in the target object's map whose resolution is less than or equal to the resolution indicated by the reference resolution information. When the target object is displayed in different positions, the map of the corresponding resolution can be selected for rendering. Since maps with smaller resolutions occupy less memory, such loading will not cause excessive waste of memory.
[0045] Optionally, after determining the target textures corresponding to each target object for each frame of the target screen, the screen display device can also unload the textures other than these target textures stored in the memory to release the memory. The screen display device can also determine whether these target textures are currently stored in the memory. For the stored target textures, there is no need to reload them, and only the target textures that are not currently loaded into the memory can be loaded. In one implementation, the screen display device can unload the textures stored in the memory after each frame of the screen is displayed, and reload the required target texture based on the next frame of the screen.
[0046] In the embodiments of this specification, a GPU-driven rendering pipeline is used to render the screen, and a target texture is dynamically loaded for each frame of the target screen to be displayed, so that the texture can be loaded based on the display requirements, which is equivalent to realizing the texture streaming function in the GPU-driven rendering pipeline, avoiding excessive memory consumption by loading all the textures at one time. In addition, the rich scene cropping function of the GPU-driven rendering pipeline can be utilized, as well as the high screen rendering performance and high computing efficiency, which can improve the screen display effect.
[0047] In summary, in the screen display method provided by the embodiment of this specification, for the target screen to be displayed, the target scene can be cropped in the image processor to eliminate the objects that do not need to be displayed in the target scene, and the target objects to be displayed can be determined; and then the corresponding reference resolution information is determined only for each target object based on the distance between it and the virtual camera. In this way, the resolution information can be determined only for a small number of objects in the target scene, reducing the consumption of computing resources and ensuring a faster computing speed. Since multiple threads can be used in the image processor for parallel processing, the reference resolution information can be determined in parallel for each target object to improve processing efficiency. Accordingly, it can be ensured that the central processing unit renders each target object faster, improving the efficiency and effect of screen display. And the central processing unit only loads the texture corresponding to the target object to be displayed, which can avoid additional memory occupation.
[0048] In some embodiments, when multiple objects corresponding to the same object model in the target scene and located at different positions are considered to be the same target object, the screen display device can determine the reference resolution information of the target object for the resolution information of the map required for displaying the objects at the multiple positions. If the second target object set at multiple positions in the target scene needs to be displayed in the target screen, the target distance of the second target object at multiple positions can be determined in the above step 102. Determining the reference resolution information corresponding to each target object based on the target distance of each target object in the above step 104 may include: for each second target object to be displayed at multiple positions in the target screen, based on the target distance of the second target object at the multiple positions, determining the resolution information of the map required to display the second target object at the multiple positions, respectively, to obtain multiple resolution information; determining the resolution information indicating the maximum resolution in the multiple resolution information as the reference resolution information corresponding to the second target object.
[0049] The method for determining the target distance of the second target object at each position can refer to the aforementioned introduction to the target distance. The target distance is the distance between the second target object and the virtual camera when it is at this position. The second target object may correspond to a bounding box, and the target distance may refer to the distance between the bounding box and the virtual camera, or may be considered as the minimum distance between each point on the second target object and the virtual camera. For each position where the second target object is located, the resolution information of the map required to display the second target object at the position may be determined in accordance with the aforementioned method of calculating the reference resolution information. Afterwards, the resolution information corresponding to the multiple positions (such as the mip level) may be compared to determine the minimum mip level (corresponding to the maximum resolution) required to display the second target object in the target screen, and the final reference resolution information may be determined based on the minimum mip level to facilitate subsequent loading and rendering of the corresponding map.
[0050] In some embodiments, the screen display device loads and displays the target map of the target object in step 106, and also needs to be based on the target distance of the target object. For the second target object, the GPU of the screen display device needs to compare its target distances at various positions to determine the minimum target distance, so that the CPU loads and displays the target map based on the minimum target distance. In the embodiment of this specification, for the second target object, the comparison process of its target distance at various positions and the corresponding resolution information can be combined to reduce the resource overhead caused by the comparison operation.
[0051] Accordingly, before determining the resolution information indicating the maximum resolution in the multiple resolution information as the reference resolution information corresponding to the second target object, the screen display device may also combine the multiple resolution information corresponding to the second target object at multiple positions with the corresponding target distance information (i.e., the target distance at the multiple positions) to obtain multiple combination information of the second target object; compare the multiple combination information, and determine the resolution information indicating the maximum resolution in the multiple resolution information and the target distance of the second target object based on the comparison result; wherein the target distance of the second target object is the minimum target distance of the second target object at the multiple positions. In the above step 106, loading the target map of each target object in the central processing unit based on the reference resolution information may include: loading the target map of each target object in the central processing unit based on the reference resolution information corresponding to each target object and the target distance of each target object. For example, the CPU of the screen display device may read back the reference resolution information and the target distance of the target object determined in the GPU.
[0052] For example, the screen display device can merge the mip level and target distance corresponding to each position of the second target object through bit operations to obtain combined information, and then compare the merged combined information through atomic operations (Inter locked Min) to determine the minimum mip level and minimum target distance corresponding to the second target object at each position. Bit operations refer to directly operating on the binary bits of integers in memory. The merge operation can set the mip level information to a high bit. The minimum mip level can be used as the reference resolution information of the target object, and the minimum target distance can be used as the target distance of the target object.
[0053] Figure 2 This is a schematic diagram of combining target distance and resolution information for comparison. Figure 2As shown, the second target object can be located at three positions. The mip level determined at the first position is 3, and the target distance is 192 meters; the mip level determined at the second position is 5, and the target distance is 256 meters; the mip level determined at the third position is 3, and the target distance is 128 meters. The mip level information is stored in 3 bits, and the target distance information is stored in 29 bits. The binary value of the mip level and the binary value of the target distance at each position are merged, and then atomic operations are performed to obtain the minimum value, and then the minimum mip level and the minimum target distance are determined based on the value. The minimum mip level is the reference resolution information of the target object.
[0054] In the embodiment of the present specification, the screen display device can be compatible with the GPU-driven rendering pipeline for screen display based on the CPU-driven rendering pipeline. The two rendering pipelines can be combined to determine the reference resolution information of each target object in the target scene. For example, for some object models in the target scene, one of the two rendering pipelines can be used for processing, and for some object models, the two rendering pipelines can also be used for processing at the same time. Optionally, the corresponding rendering pipeline can be set for each object model in advance, and accordingly, the corresponding rendering pipeline is used to determine the reference resolution information for each target object corresponding to the object model.
[0055] If a target object uses only one rendering pipeline to determine its reference resolution information, the image display device can directly determine the target texture of the target object based on the resolution indicated by the reference resolution information. If the target object uses both rendering pipelines to determine the reference resolution information, one of the two reference resolution information determined by the two rendering pipelines can be selected to determine the target texture.
[0056] For example, when the reference resolution information is determined by using the two rendering pipelines at the same time in the screen display device, the reference resolution information indicating a higher resolution can be selected to determine the target texture. Accordingly, in the above step 106, loading the target texture of each target object in the central processor based on the reference resolution information may include: reading back the reference resolution information corresponding to each target object determined in the image processor in the central processor; for the first target object whose reference resolution information is determined in both the central processor and the image processor, comparing the two reference resolution information corresponding to the first target object; and loading the target texture of the first target object based on the reference resolution information indicating a larger resolution in the two reference resolution information.
[0057] In an embodiment of the present specification, for each target object to be displayed in the target screen, the target object corresponding to its rendering pipeline among these target objects is determined in the CPU and GPU respectively, and the reference resolution information of the target object, such as the expected mip level, is determined accordingly. Afterwards, the CPU can read back the reference resolution information of the target object determined by the GPU, such as updating the reference resolution information to the streaming manager in the CPU. The streaming manager can determine the mip level required to be used by the corresponding renderer for each target object in the CPU. The streaming manager determines whether there is a target object for which the reference resolution information is determined in both the CPU and the GPU. If the mip level of the first target object is determined in both the CPU and the GPU, the streaming manager in the CPU can compare the two mip levels of the first target object, and determine the target map required for rendering the first target object based on the smaller mip level (which corresponds to the larger resolution). In the above step 106, the target map can be loaded by the streaming manager in the CPU, and the rendering of each target object is realized.
[0058] In the case where objects corresponding to the same object model are all considered to be the same target object, the step of loading the target texture of the first target object based on the reference resolution information indicating the larger resolution in the two reference resolution information may include: based on the reference resolution information indicating the larger resolution in the two reference resolution information, loading each target texture having a resolution less than or equal to the larger resolution in each texture of the first target object. For the loading of the target texture, reference may be made to the above-mentioned introduction to step 106, which will not be repeated here.
[0059] In some embodiments, after determining the resolution of the texture required to display each target object, the screen display device can load all the target textures of each target object into the memory at one time, and directly display the target screen based on these target textures. In other embodiments, the screen display device can load the target textures of each target object into the memory in multiple times, and display these target textures in multiple frames, so that the multi-frame image combination can realize the display of the target screen. For example, the target textures of the target objects far away from the virtual camera are delayed in loading and displaying, so as to reduce the frequency of texture loading and the frequency of updating the screen content, and reduce resource consumption. Since the user's attention to objects farther away is low, the slightly delayed display of these target objects has little effect on the user's visual experience, so resource consumption can be saved without affecting the user experience.
[0060] Correspondingly, in the above step 106, the target map of each target object is loaded in the central processing unit based on the reference resolution information, and each target object is rendered based on the loaded target map to display the target picture, including: in the central processing unit, in the order of the target distance of each target object from small to large, the target map of each target object is loaded in sequence based on the reference resolution information during the display process of multiple image frames, and each target object is rendered based on the loaded target map in the multiple image frames to display the target picture.
[0061] In the embodiment of the present specification, the display priority of the target object can be set based on the target distance of the target object, and the display priority is negatively correlated with the target distance, that is, the target object with a small target distance is displayed first. Since users pay more attention to objects with a small target distance, if the display information of each position is not updated at one time for the screen to be displayed, it is necessary to give priority to updating the display of objects with a small target distance to avoid affecting the user's viewing experience of the screen. Optionally, the number of sub-frames can be pre-set to complete the display of the target screen in the number of image frames. Based on the total number of maps required for the display of the target screen and the number of sub-frames, the number of maps to be loaded during the display of each image frame is determined, and then the map loading and display are completed frame by frame according to the number of maps during the display of the number of image frames. Optionally, the number of target objects corresponding to the display process of each image frame can also be determined according to the total number of target objects and the number of sub-frames, and then the target maps of the number of target objects are loaded and displayed during the display of each image frame.
[0062] In some embodiments, the streaming manager in the CPU of the screen display device can read back the reference resolution information of each target object from the GPU frame by frame based on the display priority of each target object, and then during the display process of each image frame, directly load and display the target map based on the read back reference resolution information.
[0063] In the embodiment of the present specification, the screen display device may not update the target map of each loaded target object for each frame of the screen to be displayed. For example, the distance between the object in the target scene and the virtual camera can be divided into multiple gradients, and the distance values in each gradient may not overlap. Each distance in the same gradient can be considered to be the same distance. The target map is updated only when the gradient where the target distance of the target object is located changes. The distance ranges corresponding to each gradient may be different, or there may be some gradients with the same distance range. For example, the distance value in one gradient includes 50 meters to 66 meters (including 50 meters, but not including 66 meters), the distance value in another gradient includes 66 meters to 82 meters (including 66 meters, but not including 82 meters), and the distance value in another gradient includes 82 meters to 114 meters (including 82 meters, but not including 114 meters). Among them, the distance ranges corresponding to the first two gradients are both 16 meters, and the distance range corresponding to the third gradient is 32 meters. Since the display accuracy requirement of the object farther away from the virtual camera is lower, the update frequency of the target object farther away can be lower, and the distance range corresponding to the gradient where the larger the target distance is located can be larger.
[0064] Accordingly, before step 106, the screen display device may also determine the gradient of each target object in a plurality of distance gradients based on the target distance of each target object in the image processor. The central processing unit may also read back the target distance of the target object and the information of its gradient from the image processor (such as the specific gradient identifier and the distance range corresponding to the gradient). In step 106, the target map of each target object is loaded in the central processing unit based on the reference resolution information, which may include: when the gradient of any target object changes relative to the previous frame of the target screen, the target map of any target object is loaded in the central processing unit based on the reference resolution information corresponding to the any target object.
[0065] Before displaying the target picture, the memory of the picture display device may store the target map of each target object in the previous frame, and may also record the target distance and the gradient of each target object. After determining the target distance of the target object in the target picture, the picture display device may directly compare the gradient of the target distance with the recorded gradient of the target distance of the target object to determine whether the gradient has changed.
[0066] In one example, the distance between the object in the target scene and the virtual camera is divided into multiple distance intervals, each distance interval is further divided into multiple gradients, and the distance range corresponding to each gradient in each distance interval can be equal. For example, the multiple distance intervals include a first interval [0, 50), a second interval [50, 300), a third interval [300, 1000), a fourth interval [1000, 2000) and a fifth interval [2000, ∞). When the target distance of the target object is in the first interval, the map of the target object can be updated in real time, which is equivalent to a very small gradient range, such as 1 meter, 0.5 meter or even smaller. The distance range corresponding to each gradient in the second interval can be 16 meters, the distance range corresponding to each gradient in the third interval can be 64 meters, the distance range corresponding to each gradient in the fourth interval can be 256 meters, and the distance range corresponding to each gradient in the fifth interval can be 512 meters.
[0067] For any target object, it can be determined in turn whether its target distance is less than the critical value of each interval to determine the interval to which the target distance belongs, and then determine the gradient to which the target distance belongs. For example, it can be determined in turn whether the target distance is less than 50 meters, 300 meters, 1000 meters and 2000 meters. When it is determined that the target distance is less than 50 meters, it is determined that the target distance belongs to the first interval, and the corresponding map of the target object needs to be updated in real time. When it is determined that the target distance is not less than 50 meters, it is determined whether the target distance is less than 300 meters. When the target distance is less than 300 meters, it is determined that the target distance belongs to the second interval, and the distance range corresponding to the gradient is 16 meters. If the target distance is not less than 300 meters, continue to judge based on the critical value of the next interval.
[0068] In the embodiments of the present specification, a dynamic threshold can be set for the memory occupied by the screen display based on the initial memory threshold originally configured for the texture streaming function. The screen display device can consider the memory occupied by non-streaming information and dynamically adjust the overall memory threshold of the screen display based on the memory to avoid the impact of non-streaming information on the screen display effect of the streaming loaded texture.
[0069] Specifically, the screen display device can monitor the memory usage of the non-streaming display information; determine the reference memory threshold based on the memory usage and the superimposed memory threshold set for the streaming display information; determine the larger value of the reference memory threshold and the initial memory threshold as the target memory threshold corresponding to the target screen, wherein the target memory threshold indicates the maximum memory value that can be occupied by displaying the target screen. Accordingly, the above step 106 loads the target map of each target object in the central processor based on the reference resolution information, including: loading the target map of each target object in the central processor based on the reference resolution information and the target memory threshold.
[0070] A memory monitoring unit can be used in the screen display device to continuously monitor the memory usage of each operation, including the display of non-streaming display information. An overlay memory threshold can be pre-set for streaming display information, and the overlay memory threshold can be a fixed value set by a staff member or user, such as 300 megabytes, 200 megabytes or other values. For each frame of the screen to be displayed, the screen display device can determine the sum of the memory usage of the currently monitored non-streaming display information and the overlay memory threshold to obtain a reference memory threshold. The reference memory threshold is then compared with the initial memory threshold set by the texture streaming function, and the larger value of the two is determined as the target memory threshold actually set for the current screen to be displayed. The screen display device can determine the target map of each target object that needs to be loaded based on the target memory threshold to ensure that the memory occupied by the screen display based on the target map does not exceed the target memory threshold.
[0071] The screen display device can determine the memory required to load the texture of each target object (such as referred to as a reference texture) according to the resolution indicated by the reference resolution information based on the reference resolution information of each target object. The reference texture includes at least a texture with a resolution indicated by the reference resolution information, and may also include a texture with a resolution less than the resolution indicated by the reference resolution information. If the sum of the memory usage of the memory and the non-streaming display information does not exceed the target memory threshold, the texture of each target object is directly loaded based on the resolution indicated by the reference resolution information, and then the corresponding rendering is performed. If the sum of the memory usage of the memory and the non-streaming display information is greater than the target memory threshold, the reference texture to be loaded can be adjusted to avoid exceeding the target memory threshold. For example, the texture of the target object can be loaded based on a resolution lower than the resolution indicated by the reference resolution information.
[0072] Accordingly, the above-mentioned step of loading the target map of each target object based on the reference resolution information and the target memory threshold may include: when the sum of the memory usage of the non-streaming display information and the total memory usage of the reference maps of each target object exceeds the target memory threshold, reducing the resolution based on the resolution indicated by the reference resolution information to obtain the target resolution information corresponding to each target object; wherein the reference map includes a map of the resolution indicated by the reference resolution information; and loading the target map of each target object based on the target resolution information corresponding to each target object.
[0073] For example, the screen display device can adjust the mip level corresponding to each target object, increase the mip level of at least one target object (corresponding to a reduced resolution), to determine whether the adjusted mip level map of each target object meets the target memory threshold. When the target memory threshold is still not met, the mip level continues to be increased until the target memory threshold is met. The mip level determined at this time is the target resolution information. For example, the screen display device can increase the mip level of each target object by one level each time it is adjusted, or it can only increase the mip level of one target object during each adjustment.
[0074] In some embodiments, the above-mentioned resolution reduction based on the reference resolution indicated by the reference resolution information may include: for each target object, in the order of target distance from large to small, the resolution is reduced based on the resolution indicated by the reference resolution information corresponding to each target object. In this way, for each target object, in the order of target distance from large to small, the mip level of the target object with a longer target distance can be increased by one level each time to determine whether the mip level of each current target object can meet the target memory threshold. If it does not meet the target, the mip level of the next target object with a slightly closer target distance is increased by one level. After the mip levels of all target objects are increased by one level, if the target memory threshold is still not met, the mip level can be increased starting from the target object with the longest target distance until the target memory threshold is met.
[0075] Figure 3 This is a simplified flow chart of a screen display method provided in an embodiment of this specification. Figure 3As shown, when the target screen needs to be displayed in the screen display device, the CPU can initiate a call instruction for the GPU-driven rendering pipeline, and the GPU can execute its corresponding processing flow accordingly. The GPU can crop the target scene based on the target screen, and calculate the expected mip level information (that is, the resolution information of the required map) based on the target object to be displayed in the target screen in the target scene obtained after cropping. The GPU also calculates the target distance from the virtual camera and the gradient to which it belongs for each target object. The GPU also compares the mip level and target distance corresponding to each position at one time for the target object displayed at multiple positions by merging the mip and target distance corresponding to each position, and obtains the minimum mip level and minimum target distance corresponding to the target object at each position, that is, the mip level and target distance of the target object determined in the GPU, and then the data can be stored. The CPU can read back the data obtained in the GPU, and update the data (such as including the mip level) of the gradient change to each target object frame by frame according to the display priority corresponding to the target distance of each target object. The CPU also compares the mip levels and target distances of each target object calculated by the CPU and GPU to determine the minimum mip level and minimum target distance of each target object as a whole. Then, the CPU also ensures the final mip level of each target object based on the target memory threshold and loads the corresponding target texture. The CPU can also release other textures in memory that do not belong to these target textures based on the final target textures to be loaded.
[0076] In the embodiment of this specification, a solution for texture streaming combined with GPU driver is provided, which can support GPU-driven rendering pipeline, so that GPU-driven rendering pipeline supports texture streaming function, and can be compatible with the original mode of using CPU-driven pipeline to use renderer to realize texture streaming. In the embodiment of this specification, the distance of target object and the update amount of texture are reduced in the display process of each frame by loading texture in frames and updating texture according to distance gradient, which can optimize the resource consumption caused by update. In addition, by combining resolution information and target distance for atomic operation comparison, the overhead of atomic operation can be reduced and data processing performance can be improved. In addition, based on the original initial memory threshold, the threshold algorithm is optimized, the memory occupation of non-streaming display information is taken into account, and the superimposed memory threshold is added on this basis, which can dynamically manage memory, solve the problem of difficult memory threshold configuration and possible image blur problem, and realize more stable and efficient memory management.
[0077] Corresponding to the above-mentioned screen display method embodiment, this specification also provides a screen display device embodiment, Figure 4 1 is a schematic diagram of the structure of a screen display device provided in an embodiment of this specification. Figure 4 As shown, the screen display device includes: The cropping module 402 is used to crop the target scene in the image processor for the target screen to be displayed, and determine each target object in the target scene to be displayed in the target screen; A first determination module 404 is used to determine reference resolution information corresponding to each target object based on a target distance of each target object in an image processor; wherein the target distance of the target object is the distance between the target object and a virtual camera corresponding to the target screen, and the reference resolution information indicates a resolution of a texture required to display the target object; The loading module 406 is used to load the target texture of each target object in the central processing unit based on the reference resolution information, and render each target object based on the loaded target texture to display the target picture.
[0078] Optionally, the loading module 406 includes: A read-back submodule, used for reading back in the central processing unit the reference resolution information corresponding to each target object determined in the image processor; A comparison submodule, for comparing two reference resolution information corresponding to a first target object for which reference resolution information is determined by both the central processing unit and the image processor; The first loading submodule is used to load a target map of a first target object based on the reference resolution information indicating a larger resolution in the two reference resolution information.
[0079] Optionally, the first loading submodule is used to: Based on the reference resolution information indicating the larger resolution in the two reference resolution information, target textures having a resolution less than or equal to the larger resolution among the textures of the first target object are loaded.
[0080] Optionally, the clipping module 402 is used to: Based on the field of view corresponding to the target image to be displayed, the target scene is cropped in the image processor to remove objects outside the field of view in the target scene; and / or, based on the screen display size corresponding to the target picture to be displayed, cropping the target scene in the image processor so that the size of the cropped target scene is proportional to the screen display size; And / or, with respect to the viewing angle corresponding to the target image to be displayed, the target scene is occluded and cropped in the image processor to remove objects that are occluded by other objects in the target scene under the viewing angle.
[0081] Optionally, the first determining module 404 is used to: In an image processor, for any target object, reference resolution information corresponding to the target object is determined based on the target distance of the target object, the texture mapping relationship of the target object, the field of view information corresponding to the target screen, and the texel information corresponding to the target object; wherein the texture mapping relationship indicates the mapping relationship between the model of the target object and the texture of the target object.
[0082] Optionally, the screen display device provided in the embodiment of this specification further includes: A monitoring module, used to monitor the memory usage of non-streaming display information; A second determination module is used to determine a reference memory threshold based on the memory usage and the overlay memory threshold set for the streaming display information; A third determination module is used to determine the larger value of the reference memory threshold and the initial memory threshold as the target memory threshold corresponding to the target picture, wherein the target memory threshold indicates the maximum memory value that can be occupied by displaying the target picture; The loading module 406 is used to load the target texture of each target object in the central processing unit based on the reference resolution information and the target memory threshold.
[0083] Optionally, the loading module 406 includes: an adjustment submodule, configured to reduce the resolution based on the resolution indicated by the reference resolution information to obtain target resolution information corresponding to each target object when the sum of the memory usage of the non-streaming display information and the total memory usage of the reference maps of each target object exceeds a target memory threshold; wherein the reference map includes a map of the resolution indicated by the reference resolution information; The second loading submodule is used to load the target map of each target object based on the target resolution information corresponding to each target object.
[0084] Optionally, the adjustment submodule is used to: For each target object, in the order of target distance from large to small, the resolution is reduced based on the resolution indicated by the reference resolution information corresponding to each target object.
[0085] Optionally, the screen display device provided in the embodiment of this specification further includes: A third determination module is used to determine the gradient of each target object in the plurality of distance gradients based on the target distance of each target object in the image processor before loading the target map of each target object based on the reference resolution information in the central processor; Loading module 406 is used to: When the gradient of any target object changes relative to a previous frame of the target image, a target map of any target object is loaded in the central processing unit based on reference resolution information corresponding to any target object.
[0086] Optionally, the loading module 406 is used to: In the central processing unit, target maps of the target objects are loaded in sequence based on reference resolution information in the display process of multiple image frames in the order of target distance from small to large, and each target object is rendered in the multiple image frames based on the loaded target map to display the target picture.
[0087] Optionally, the first determining module 404 is used to: For a second target object to be displayed at multiple positions in the target screen among the target objects, based on the target distances of the second target object at the multiple positions, resolution information of a map required to respectively display the second target object at the multiple positions is determined to obtain multiple pieces of resolution information; The resolution information indicating the maximum resolution among the multiple resolution information is determined as the reference resolution information corresponding to the second target object.
[0088] Optionally, the screen display device provided in the embodiment of this specification further includes: a merging module, configured to merge the plurality of resolution information with information on target distances of the second target object at a plurality of positions, respectively, before determining the resolution information indicating the maximum resolution among the plurality of resolution information as the reference resolution information corresponding to the second target object, to obtain a plurality of combination information of the second target object; a fourth determination module, configured to compare the plurality of combined information, and determine, based on the comparison result, resolution information indicating a maximum resolution among the plurality of resolution information, and a target distance of the second target object; wherein the target distance of the second target object is a minimum target distance of the second target object at a plurality of positions; Loading module 406 is used to: In the central processing unit, a target map of each target object is loaded based on the reference resolution information corresponding to each target object and the target distance of each target object.
[0089] In summary, in the screen display device provided by the embodiment of the present specification, for the target screen to be displayed, the target scene can be cropped in the image processor to eliminate the objects that do not need to be displayed in the target scene, and the target objects to be displayed can be determined; and then the corresponding reference resolution information is determined only for each target object based on the distance between it and the virtual camera. In this way, the resolution information can be determined only for a small number of objects in the target scene, reducing the consumption of computing resources and ensuring a faster computing speed. Since multiple threads can be used for parallel processing in the image processor, the reference resolution information can be determined in parallel for each target object to improve processing efficiency. Accordingly, it can be ensured that the central processing unit renders each target object faster, improving the efficiency and effect of screen display. And the central processing unit only loads the texture corresponding to the target object to be displayed, which can avoid additional memory occupation.
[0090] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. As for the display device of the target image, since it is basically similar to the embodiment of the display method of the target image, the description is relatively simple, and the relevant parts can be referred to the partial description of the embodiment of the display method of the target image.
[0091] Figure 5 5 is a block diagram of a computing device provided in an embodiment of the present specification. The components of the computing device 500 include but are not limited to a memory 510 and a processor 520. The processor 520 is connected to the memory 510 via a bus 530, and the database 550 is used to store data.
[0092] The computing device 500 also includes an access device 540 that enables the computing device 500 to communicate via one or more networks 560. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 540 may include one or more of any type of network interface (e.g., a network interface card (NIC)) that is wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, and a near field communication (NFC).
[0093] In one embodiment of the present specification, the above components of the computing device 500 and Figure 5 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 5 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0094] The computing device 500 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 500 may also be a mobile or stationary server.
[0095] The processor 520 is used to execute computer programs / instructions, which, when executed by the processor, implement the above Figure 1 or Figure 3 The method shown.
[0096] As for the computing device embodiment, since it is basically similar to the above-mentioned method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0097] One embodiment of the present specification also provides a computer-readable storage medium, which stores computer instructions, and when the computer instructions are executed by the processor, the steps of the above-mentioned image processing method are implemented. The computer instructions include computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable storage medium may include: any entity or device that can carry the computer program code, recording medium, USB flash drive, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media do not include electric carrier signals and telecommunication signals.
[0098] An embodiment of the present specification also provides a computer program product, including a computer program / instruction, which implements the steps of the above method when the computer program / instruction is executed in a processor.
[0099] As for the computer-readable storage medium embodiment and the computer program product embodiment, since they are basically similar to the above-mentioned method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0100] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0101] It should be noted that the above is a description of a specific embodiment of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of the present specification.
[0102] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0103] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can understand and use this specification well.
Claims
1. A screen display method, characterized in that: The method comprises: For a target screen to be displayed, a target scene is cropped in an image processor to determine target objects in the target scene to be displayed in the target screen; Determining reference resolution information corresponding to each target object in the image processor based on the target distance of each target object; wherein the target distance of the target object is the distance between the target object and a virtual camera corresponding to the target screen, and the reference resolution information indicates the resolution of the map required to display the target object; The target texture of each target object is loaded in the central processing unit based on the reference resolution information, and each target object is rendered based on the loaded target texture to display the target screen.
2. The method according to claim 1, characterized in that The step of loading the target map of each target object in the central processing unit based on the reference resolution information includes: Reading back in a central processing unit the reference resolution information corresponding to each target object determined in the image processor; For a first target object for which reference resolution information is determined by both the central processor and the image processor, comparing two reference resolution information corresponding to the first target object; Based on the reference resolution information indicating a larger resolution among the two reference resolution information, a target map of the first target object is loaded.
3. The method according to claim 2, characterized in that The step of loading the target map of the first target object based on the reference resolution information indicating a larger resolution in the two reference resolution information includes: Based on the reference resolution information indicating a larger resolution in the two reference resolution information, target textures having a resolution less than or equal to the larger resolution among the textures of the first target object are loaded.
4. The method according to claim 1, characterized in that: Determining the reference resolution information corresponding to each target object based on the target distance of each target object in the image processor includes: In the image processor, for any target object, reference resolution information corresponding to the target object is determined based on the target distance of the target object, the texture mapping relationship of the target object, the field of view information corresponding to the target screen, and the texel information corresponding to the target object; wherein the texture mapping relationship indicates the mapping relationship between the model of the target object and the texture of the target object.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Monitor the memory usage of non-streaming display information; Determining a reference memory threshold based on the memory usage and an overlay memory threshold set for the streaming display information; Determine a larger value between the reference memory threshold and the initial memory threshold as a target memory threshold corresponding to the target picture, wherein the target memory threshold indicates a maximum memory value that can be occupied by displaying the target picture; The step of loading the target map of each target object in the central processing unit based on the reference resolution information includes: The target map of each target object is loaded in the central processing unit based on the reference resolution information and the target memory threshold.
6. The method according to claim 5, characterized in that The step of loading the target map of each target object based on the reference resolution information and the target memory threshold comprises: When the sum of the memory usage of the non-streaming display information and the total memory usage of the reference maps of the target objects exceeds the target memory threshold, the resolution is reduced based on the resolution indicated by the reference resolution information to obtain the target resolution information corresponding to each target object; wherein the reference map includes a map of the resolution indicated by the reference resolution information; Based on the target resolution information corresponding to each target object, a target map of each target object is loaded.
7. The method according to claim 6, characterized in that The step of reducing the resolution based on the reference resolution indicated by the reference resolution information includes: For each target object, in the order of target distance from large to small, the resolution is reduced based on the resolution indicated by the reference resolution information corresponding to each target object.
8. The method according to any one of claims 1 to 4, characterized in that: Before the target map of each target object is loaded in the central processor based on the reference resolution information, the method further includes: Determining, in the image processor, a gradient of each target object among a plurality of distance gradients based on the target distance of each target object; The step of loading the target map of each target object in the central processing unit based on the reference resolution information includes: When the gradient of any target object changes relative to a previous frame of the target image, a target map of any target object is loaded in a central processing unit based on reference resolution information corresponding to the target object.
9. The method according to any one of claims 1 to 4, characterized in that: The step of loading the target texture of each target object in the central processor based on the reference resolution information, and rendering each target object based on the loaded target texture to display the target screen includes: In the central processing unit, the target maps of the target objects are loaded in sequence based on the reference resolution information in the display process of multiple image frames in the order of the target distance of the target objects from small to large, and the target objects are rendered in the multiple image frames based on the loaded target maps to display the target screen.
10. The method according to any one of claims 1 to 4, characterized in that: The determining, based on the target distance of each target object, reference resolution information corresponding to each target object includes: For a second target object to be displayed at multiple positions in the target screen among the target objects, based on target distances of the second target object at the multiple positions, resolution information of a map required to respectively display the second target object at the multiple positions is determined to obtain multiple pieces of resolution information; The resolution information indicating the maximum resolution among the multiple resolution information is determined as the reference resolution information corresponding to the second target object.
11. The method according to claim 10, characterized in that Before determining the resolution information indicating the maximum resolution among the plurality of resolution information as the reference resolution information corresponding to the second target object, the method further includes: Combining the plurality of resolution information with the information of target distances of the second target object at the plurality of positions respectively to obtain a plurality of combination information of the second target object; Comparing the multiple combined information, and determining the resolution information indicating the maximum resolution among the multiple resolution information and the target distance of the second target object based on the comparison result; wherein the target distance of the second target object is the minimum target distance of the second target object at the multiple positions; The step of loading the target map of each target object in the central processing unit based on the reference resolution information includes: The target map of each target object is loaded in the central processing unit based on the reference resolution information corresponding to each target object and the target distance of each target object.
12. A screen display device, characterized in that: The picture display device comprises: A cropping module, for cropping a target scene in an image processor for a target screen to be displayed, and determining target objects in the target scene to be displayed in the target screen; A first determination module is used to determine, in the image processor, reference resolution information corresponding to each target object based on a target distance of each target object; wherein the target distance of the target object is a distance between the target object and a virtual camera corresponding to the target screen, and the reference resolution information indicates a resolution of a texture required to display the target object; The loading module is used to load the target texture of each target object in the central processing unit based on the reference resolution information, and render each target object based on the loaded target texture to display the target picture.
13. A computing device, characterized in that: include: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the method according to any one of claims 1 to 11 is implemented.
14. A computer-readable storage medium, characterized in that: A computer program / instruction is stored, and when the computer program / instruction is executed by a processor, the method according to any one of claims 1 to 11 is implemented.
15. A computer program product, characterized in that The method comprises a computer program / instruction, which implements the method according to any one of claims 1 to 11 when executed by a processor.