WO2022127278A1 - Method and apparatus for rendering virtual scene - Google Patents

Method and apparatus for rendering virtual scene Download PDF

Info

Publication number
WO2022127278A1
WO2022127278A1 PCT/CN2021/121484 CN2021121484W WO2022127278A1 WO 2022127278 A1 WO2022127278 A1 WO 2022127278A1 CN 2021121484 W CN2021121484 W CN 2021121484W WO 2022127278 A1 WO2022127278 A1 WO 2022127278A1
Authority
WO
WIPO (PCT)
Prior art keywords
rendering
target
virtual scene
stage
resource
Prior art date
Application number
PCT/CN2021/121484
Other languages
French (fr)
Chinese (zh)
Inventor
王月
冯星
孙思远
胡梓楠
Original Assignee
完美世界(北京)软件科技发展有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 完美世界(北京)软件科技发展有限公司 filed Critical 完美世界(北京)软件科技发展有限公司
Publication of WO2022127278A1 publication Critical patent/WO2022127278A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/20Processor architectures; Processor configuration, e.g. pipelining
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/006Mixed reality

Definitions

  • the present invention relates to the field of computers, and in particular, to a method and device for rendering a virtual scene.
  • the current process of rendering a virtual scene is usually to first abstract the renderer interface of the engine, and then implement the renderer according to different types of rendering interfaces.
  • This implementation is to convert special to general, and use a set of general code to realize the general rendering process, because this implementation needs to be compatible with the lower version of the rendering interface, and supporting the lower version of the rendering interface will cause the system to run. Therefore, it is impossible to exert the maximum performance of the system hardware according to the characteristics of the hardware, resulting in low rendering efficiency of the virtual scene.
  • a method for rendering a virtual scene comprising:
  • a rendering frame diagram corresponding to the virtual scene is obtained, wherein the rendering frame diagram records the rendering process information and rendering resource information corresponding to the virtual scene, and the rendering process information is used to indicate rendering The rendering stage divided by the virtual scene and the rendering substage divided by each rendering stage, the rendering resource information is used to indicate that each rendering substage is allowed to use the rendering corresponding to the on-chip fragment cache of the graphics processor the resource status of the resource;
  • the virtual scene is rendered according to the target rendering process.
  • a device for rendering a virtual scene comprising:
  • An acquisition module configured to acquire a rendering frame diagram corresponding to the virtual scene when rendering the virtual scene, wherein the rendering frame diagram records the rendering process information and rendering resource information corresponding to the virtual scene, and the rendering process The information is used to indicate the rendering stage divided for rendering the virtual scene and the rendering substage divided by each of the rendering stages, and the rendering resource information is used to indicate that each rendering substage is allowed to use the on-chip slice of the graphics processor The resource status of the rendering resource corresponding to the cache;
  • a first creation module configured to create a target rendering process corresponding to the virtual scene according to the rendering frame diagram, wherein the target rendering resource used in the target rendering process satisfies the resource state indicated by the rendering resource information;
  • a rendering module configured to render the virtual scene according to the target rendering process.
  • an electronic device comprising a memory, a processor, and a computer program/instruction stored on the memory, the processor implementing the above-mentioned method for rendering a virtual scene when the computer program/instruction is executed A step of.
  • a computer device/equipment/system comprising a memory, a processor, and a computer program/instruction stored on the memory, the processor implements the above virtual when executing the computer program/instruction The steps of the rendering method of the scene.
  • a computer-readable medium on which computer programs/instructions are stored, and when the computer programs/instructions are executed by a processor, implement the steps of the above-mentioned method for rendering a virtual scene.
  • a computer program product comprising computer programs/instructions, when the computer programs/instructions are executed by a processor, the steps of the above method for rendering a virtual scene are implemented.
  • a rendering frame diagram corresponding to the virtual scene when rendering a virtual scene, a rendering frame diagram corresponding to the virtual scene is obtained, wherein the rendering frame diagram records the rendering process information and rendering resource information corresponding to the virtual scene, and the rendering process information is used to indicate rendering.
  • the rendering stage divided by the virtual scene and the rendering substage divided by each rendering stage, and the rendering resource information is used to indicate the resource status of the rendering resource corresponding to the on-chip fragment cache of the graphics processor that allows each rendering substage; according to The rendering frame diagram creates the target rendering process corresponding to the virtual scene, wherein the target rendering resources used in the target rendering process satisfy the resource state indicated by the rendering resource information; according to the way of rendering the virtual scene in the target rendering process, the rendering frame diagram records the Use the resource state required by the graphics processing unit (GPU) on-chip shard cache and the divided rendering stages and sub-stages.
  • GPU graphics processing unit
  • FIG. 1 is a schematic diagram of a hardware environment of a method for rendering a virtual scene according to an embodiment of the present application
  • FIG. 2 is a flowchart of an optional virtual scene rendering method according to an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a rendering process of a virtual scene according to an optional embodiment of the present application.
  • FIG. 4 is a schematic diagram of constructing a rendering frame diagram according to an embodiment of the present application.
  • FIG. 5 is a schematic diagram of a process of constructing a rendering frame diagram based on Vulkan according to an optional embodiment of the present application
  • FIG. 6 is a schematic diagram of an optional virtual scene rendering apparatus according to an embodiment of the present application.
  • FIG. 7 is a structural block diagram of an electronic device according to an embodiment of the present application.
  • FIG. 8 is a schematic diagram of a computer apparatus/equipment/system according to an embodiment of the present application.
  • Figure 9 is a block diagram of a computer program product according to an embodiment of the present application.
  • an embodiment of a method for rendering a virtual scene is provided.
  • the foregoing virtual scene rendering method may be applied to a hardware environment composed of a terminal 101 and a server 103 as shown in FIG. 1 .
  • the server 103 is connected to the terminal 101 through the network, and can be used to provide services (such as game services, application services, etc.) for the terminal or the client installed on the terminal, and a database can be set on the server or independently of the server,
  • the above-mentioned network includes but is not limited to: a wide area network, a metropolitan area network or a local area network, and the terminal 101 is not limited to a PC, a mobile phone, a tablet computer, and the like.
  • the method for rendering a virtual scene in this embodiment of the present application may be executed by the server 103 , may also be executed by the terminal 101 , or may be executed jointly by the server 103 and the terminal 101 .
  • the terminal 101 may execute the rendering method of the virtual scene of the embodiment of the present application by a client installed on the terminal 101 .
  • FIG. 2 is a flowchart of an optional virtual scene rendering method according to an embodiment of the present application. As shown in FIG. 2 , the method may include the following steps:
  • Step S202 when rendering the virtual scene, obtain a rendering frame diagram corresponding to the virtual scene, wherein the rendering frame diagram records the rendering process information and rendering resource information corresponding to the virtual scene, and the rendering process information is used
  • the rendering resource information is used to indicate that each rendering substage is allowed to use the on-chip fragment cache of the graphics processor.
  • the resource status of the corresponding rendering resource is used to indicate that each rendering substage is allowed to use the on-chip fragment cache of the graphics processor.
  • Step S204 creating a target rendering process corresponding to the virtual scene according to the rendering frame diagram, wherein the target rendering resource used in the target rendering process satisfies the resource state indicated by the rendering resource information;
  • Step S206 rendering the virtual scene according to the target rendering process.
  • the rendering frame diagram records the resource states required to use the graphics processing unit (GPU) on-chip fragment cache and the divided rendering stages and sub-stages.
  • the rendering frame diagram creates Rendering the scene in the rendering process can ensure that the rendering process exerts the optimal performance of the hardware, achieves the technical effect of improving the rendering efficiency of the virtual scene, and solves the technical problem of low rendering efficiency of the virtual scene.
  • the above-mentioned virtual scene may include, but is not limited to, a game scene, a virtual reality (VR) scene, an animation scene, a simulator scene, and the like.
  • a game scene is rendered in the Android system of a mobile phone
  • an animation scene is rendered in the Android system of a PC computer, and so on.
  • the rendering process information and rendering resource information corresponding to the virtual scene are recorded in the above-mentioned rendering frame graph, and the rendering process information is used to indicate the rendering stage (render pass) divided by the rendering of the virtual scene. ) and the rendering sub-stage (sub render pass) divided by each rendering stage, the rendering resource information is used to indicate that each rendering sub-stage is allowed to use the on-chip tile buffer (Tile Buffer) of the graphics processor (Graphics Processing Unit, GPU). The resource status of the corresponding rendering resource.
  • the resource status of the rendering resources required to use the GPU's on-chip shard cache is marked in the rendering resource information, so that the created rendering process can call the GPU's on-chip shard cache, giving full play to the rendering performance of the GPU and improving rendering efficiency.
  • the rendering process information recorded in the rendering frame diagram indicates the rendering stage divided into rendering the virtual scene and the rendering substage divided by each rendering stage, and each rendering substage (sub render pass) ) may be a rendering pass in the traditional division method.
  • a traditional rendering process may include two render passes: Geometry render pass and Lighting render pass.
  • the two render passes are recorded as two sub render passes: Geometry sub render pass and Lighting sub render pass. These two sub render passes form a render pass in the frame graph.
  • the rendering stage and the rendering sub-stage divided into the rendering virtual scene indicated by the rendering process information and each rendering stage may be, but are not limited to, according to allowing each rendering sub-stage to use graphics processing.
  • the rendering stage that meets the resource status requirements of the rendering resources corresponding to the on-chip fragment cache of the graphics processor in the original rendering process can be used as the rendering sub-stage.
  • the stages are merged into a new render stage.
  • the above Geometry render pass and Lighting render pass can meet the resource status requirements of rendering resources corresponding to the on-chip shard cache using the graphics processor, the above Geometry render pass and Lighting render pass can be used as Geometry sub render pass and Lighting sub render passes are combined into one render pass.
  • the resource state of the rendering resource corresponding to the on-chip fragment cache that is allowed to use the graphics processor may include, but is not limited to, the size of the rendering target, the format of the rendering target, the loading state (load action), the storage State (store action) and temporary use state, etc.
  • the loading state (load action) can include but is not limited to: load (loading), clear (clear the last content) and don't care (don't care about the previous content) and so on.
  • the store action can include, but is not limited to, store (store content), clear (clear the last content), don't care (don't care about the previous content), and so on.
  • the temporary usage state may include, but is not limited to, tile buffers.
  • the target rendering resource used in the target rendering process corresponding to the virtual scene created according to the rendering frame diagram satisfies the resource state indicated by the rendering resource information, so that the target rendering process can give full play to the hardware.
  • rendering the virtual scene according to the target rendering process is to use the created rendering resources to render the virtual scene according to the divided rendering stages and rendering sub-stages.
  • the slice cache of the GPU can be used, Thereby improving rendering efficiency.
  • creating a target rendering process corresponding to the virtual scene according to the rendering frame diagram includes:
  • the target rendering resources of each rendering sub-stage are first created, and then the target rendering resources of each rendering sub-stage are connected to obtain the target rendering process.
  • the target rendering resource created for each rendering sub-stage needs to satisfy the resource state indicated by the rendering resource information to ensure that it uses the GPU's fragment cache during the rendering process.
  • FIG. 3 is a schematic diagram of a rendering process of a virtual scene according to an optional embodiment of the present application.
  • the rendering frame graphs (Frame Graphs) of different rendering systems are configured according to project requirements.
  • the rendering frame diagram using the on-chip shard cache of the GPU of the mobile phone is configured under the Vulkan renderer system of the mobile phone.
  • GPU graphics processor
  • creating the target rendering resource that satisfies the resource state for each rendering sub-stage according to the rendering resource information includes:
  • the constructed rendering resource may include, but is not limited to, a rendering target (Render Target) that meets the requirements, and the requirements that the rendering target needs to meet may include, but are not limited to, the size of the rendering target, the format of the rendering target, and the graphics processing. That is, if you need to use the GPU's shard cache, you first need to divide the rendering process into rendering sub-stages, and secondly, you need to configure the size, format and GPU storage state of the Render Target to meet the requirements of calling the GPU's shard cache.
  • the loading state and storage state of the render target can be configured according to the actual needs of the rendering process.
  • the rendering resources created through the above process can optimize the hardware environment of the rendering process, that is, the hardware will use the on-chip (On-Chip) cache (Tile Buffer) as much as possible, that is, minimize the hardware environment.
  • Using the on-chip cache as much as possible can reduce this latency and improve rendering efficiency.
  • acquiring the rendering frame diagram corresponding to the virtual scene includes:
  • different rendering frame graphs may be configured for different types of scenes, and the rendering frame graph corresponding to the scene condition satisfied by the current virtual scene is used as the rendering frame graph for rendering the current scene.
  • FIG. 4 is a schematic diagram of constructing a rendering frame graph according to an embodiment of the present application.
  • multiple rendering frame graphs Frame Graph are pre-created, and one rendering frame graph Frame Graph 1 includes three rendering frame graphs.
  • Targets (Render Target 11, Render Target 12 and Render Target 13), from Render Target 11 to Render Target 12 are divided into a render sub pass Sub render pass 11, from Render Target 12 to Render Target 13 is divided into another render sub pass Stage Sub render pass 12.
  • Another rendering frame graph Frame Graph 2 includes five render targets (Render Target 21, Render Target 22, Render Target 23, Render Target 24 and Render Target 25), from Render Target 21 to Render Target 22, Render Target 23 and Render respectively Target 24 is divided into a rendering sub-stage Sub render pass 21, respectively from Render Target 22, Render Target 23 and Render Target 24 to Render Target 25 are divided into another rendering sub-stage Sub render pass 22.
  • Each rendering frame diagram corresponds to a scene condition, and virtual scenes that meet the scene conditions can be rendered using the corresponding rendering frame diagram.
  • the scene condition corresponding to Frame Graph 1 is that no lighting effect needs to be rendered
  • the scene condition corresponding to Frame Graph 2 is that lighting effects need to be rendered
  • the method before acquiring the rendering frame diagram corresponding to the virtual scene, the method further includes:
  • a rendering frame diagram capable of exerting the optimal performance of the hardware may be created, but not limited to, according to project requirements.
  • the division process of the rendering stage and the rendering sub-stage may be, but is not limited to, configuring the rendering stage in the original rendering process as a rendering sub-stage according to the requirements of achieving an optimal hardware environment, and then configuring the rendering stage.
  • the rendering sub-stages of the Render stage make up the rendering stage.
  • the rendering target is the Render Target
  • the rendering target information includes: the rendering target size, the rendering target format and the temporary use state that can achieve the rendering target required by the optimal hardware environment, wherein the temporary use State is used to indicate the on-chip shard cache that allows each rendering substage to use the GPU's on-chip shard cache, as well as the load state and store state of the render target configured according to the project's needs.
  • configuring the rendering target and rendering target information included in each rendering sub-stage includes:
  • the render target size and the render target format are configured to allow the use of the render target size and render target format of the on-chip fragment cache of the graphics processor. That is, using the GPU's on-chip fragment cache requires the render target to meet certain size and format requirements.
  • the loading state and storage state of the rendering target may be determined by, but not limited to, the requirements of the virtual scene.
  • the way of marking the on-chip storage state of the graphics processor of the rendering target as the slice cache may include, but is not limited to, when allocating video memory for VulkanMobileRenderTarget, specifying the way of allocating video memory plus the bit of VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT. , so that the Android on-chip cache can be used to reduce the bandwidth.
  • dividing the rendering process of the virtual scene into a rendering stage and a rendering sub-stage includes:
  • a rendering stage that can be configured as a rendering substage in the original rendering process is configured as a rendering substage, and then the configured rendering substages are combined into a rendering stage.
  • configuring the rendering target and rendering target information included in each rendering sub-stage includes:
  • S74 Mark the on-chip storage states of the position rendering target, the normal rendering target, the reflectivity rendering target, the depth rendering target, and the lighting rendering target as a slice cache.
  • the rendering targets of the geometry rendering sub-stage include a position rendering target (position), a normal rendering target (normal), an albedo rendering target (albedo), a depth rendering target (depth), and a lighting rendering target.
  • the render targets of the sub-stage include Lighting.
  • the above-mentioned preset size and preset format are the size of the rendering target and the format of the rendering target required by using the GPU on-chip fragment cache.
  • the loading state and the storage state can be configured according to the requirements of the virtual scene, for example, the position rendering target (position), the normal rendering target (normal), the reflectance rendering target (albedo) and the
  • the load state (load action) of the depth rendering target (depth) is marked as clearing the previous content (clear)
  • the storage state (store action) is marked as do not care about the next content (don't care)
  • the load state (load action) is marked as don't care
  • the store state (store action) is marked as store content (store).
  • the on-chip storage state of the graphics processor of the rendering target is marked as a slice cache, so that the rendering process can fully use the slice cache of the GPU.
  • the position, normal, albedo, depth, and lighting on-chip storage state of the graphics processor (GPU storage) state is marked as a tile buffer.
  • FIG. 5 is a schematic diagram of a process of constructing a rendering frame graph based on Vulkan according to an optional embodiment of the present application.
  • the constructed rendering frame graph is capable of rendering deferred lighting ( deferred lighting) effect rendering frame diagram, first, Geometry RenderPass in the original rendering frame diagram constructed by the original rendering process renders the scene to the Render Target of position, normal, albedo, and depth respectively, and then passes the Lighting RenderPass to calculate the lighting to the Render Target of lighting superior. It is configured with two Render Passes (Geometry, Lighting) and uses five GPU Render Targets.
  • Geometry and Lighting are combined into one Render Pass, which respectively becomes Sub Render Pass (ie Geometry Sub Pass and Lighting Sub Pass), and the states of the above five render targets are set so that the rendering process can Efficient use of GPU Tile Buffers.
  • Configure the loading state (load action) of position, normal, albedo, and depth to clear (clear the last content) configure the storage state (store action) to don't care (don't care about the content afterward), and set the loading state of Lighting ( load action) is configured as don't care (don't care about the previous content), and the storage state (store action) is configured as store (stored content).
  • the GPU storage states of position, normal, albedo, depth and Lighting as tile buffers, so that the hardware performance of the GPU can be fully utilized to obtain the target rendering frame diagram.
  • the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is better implementation.
  • the technical solution of the present application can be embodied in the form of a software product in essence or in a part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, CD-ROM), including several instructions to make a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) execute the methods described in the various embodiments of this application.
  • a storage medium such as ROM/RAM, magnetic disk, CD-ROM
  • FIG. 6 is a schematic diagram of an optional virtual scene rendering apparatus according to an embodiment of the present application. As shown in FIG. 6 , the apparatus may include:
  • the obtaining module 62 is configured to obtain a rendering frame diagram corresponding to the virtual scene when rendering the virtual scene, wherein the rendering frame diagram records the rendering process information and rendering resource information corresponding to the virtual scene, and the rendering The process information is used to indicate the rendering stages divided into rendering the virtual scene and the rendering substages divided by each of the rendering stages, and the rendering resource information is used to indicate that each rendering substage is allowed to use the on-chip sub-stage of the graphics processor.
  • the first creation module 64 is configured to create a target rendering process corresponding to the virtual scene according to the rendering frame diagram, wherein the target rendering resource used in the target rendering process satisfies the resource state indicated by the rendering resource information ;
  • the rendering module 66 is configured to render the virtual scene according to the target rendering process.
  • the acquiring module 62 in this embodiment may be used to execute step S202 in this embodiment of the present application
  • the first creating module 64 in this embodiment may be used to execute step S204 in this embodiment of the present application
  • the The rendering module 66 in the embodiment may be configured to perform step S206 in the embodiment of the present application.
  • the rendering frame diagram records the resource status required to use the graphics processing unit (GPU) on-chip fragment cache and the divided rendering stages and sub-stages.
  • GPU graphics processing unit
  • a rendering process is created according to the rendering frame diagram to perform the scene. The rendering can ensure the optimal performance of the hardware in the rendering process, achieve the technical effect of improving the rendering efficiency of the virtual scene, and then solve the technical problem of low rendering efficiency of the virtual scene.
  • the first creation module includes:
  • a first creation unit configured to create the target rendering resource that satisfies the resource state for each rendering sub-stage according to the rendering resource information
  • a second creating unit configured to create the target rendering process between the target rendering resources according to the rendering process information.
  • the first creation unit is used for:
  • the obtaining module includes:
  • a first obtaining unit configured to obtain scene information of the virtual scene
  • a second obtaining unit configured to obtain target scene conditions satisfied by the scene information from a plurality of scene conditions, wherein the plurality of scene conditions correspond to a plurality of rendering framework diagrams one-to-one;
  • a determining unit configured to determine the rendering frame diagram corresponding to the target scene condition as the rendering frame diagram corresponding to the virtual scene.
  • the device further includes:
  • a dividing module is used to divide the rendering process of the virtual scene into a rendering stage and a rendering sub-stage before obtaining the rendering frame diagram corresponding to the virtual scene, and obtain the rendering process information;
  • a configuration module configured to configure the rendering target and rendering target information included in each rendering sub-stage, and obtain the rendering resource information, wherein the rendering target information includes the rendering target size, rendering target format, loading state, storage state and a temporary use state, the temporary use state is used to indicate that each rendering sub-stage is allowed to use the on-chip fragment cache of the graphics processor;
  • a second creation module configured to create the rendering frame diagram by using the rendering process information and the rendering resource information.
  • the configuration module includes:
  • a first configuration unit configured to configure the rendering target size and rendering target format of the rendering target to allow the use of the rendering target size and rendering target format of the on-chip fragment cache of the graphics processor;
  • a second configuration unit configured to configure the loading state and storage state of the rendering target to meet the loading state and storage state required by the virtual scene
  • a first marking unit configured to mark the on-chip storage state of the graphics processor of the rendering target as a slice cache.
  • the dividing module is used for:
  • the geometry rendering sub-stage and the lighting rendering sub-stage are combined into a rendering stage.
  • the configuration module includes:
  • a third configuration unit configured to configure the rendering targets of the geometry rendering sub-stage to include a position rendering target, a normal rendering target, a reflectance rendering target and a depth rendering target, and the rendering targets of the lighting rendering sub-stage include a lighting rendering target;
  • the fourth configuration unit is used to mark the rendering target size of the position rendering target, the normal rendering target, the reflectivity rendering target, the depth rendering target and the lighting rendering target as a preset size, and render The target format is marked as a preset format;
  • the second marking unit is used to mark the loading status of the position rendering target, the normal rendering target, the reflectivity rendering target and the depth rendering target as clearing the previous content, and marking the storage status as not caring about the later content, and marking the The loading state of the lighting rendering target is marked as don't care about the content after, and the storage state is marked as storage content;
  • a third marking unit configured to mark the position rendering target, the normal rendering target, the reflectivity rendering target, the depth rendering target and the on-chip storage state of the lighting rendering target on-chip of the graphics processor as divided slice cache.
  • the above modules may run in the hardware environment as shown in FIG. 1 , and may be implemented by software or hardware, wherein the hardware environment includes a network environment.
  • an electronic device for implementing the above virtual scene rendering method is also provided.
  • FIG. 7 is a structural block diagram of an electronic device according to an embodiment of the present application.
  • the electronic device may include: one or more (only one is shown in the figure) a processor 701 , a memory 703 , and a transmission
  • the device 705, as shown in FIG. 7, the electronic device may further include an input and output device 707.
  • the memory 703 may be used to store software programs and modules, such as program instructions/modules corresponding to the virtual scene rendering method and device in the embodiments of the present application, and the processor 701 runs the software programs and modules stored in the memory 703 to thereby Execute various functional applications and data processing, that is, realize the above-mentioned rendering method of the virtual scene.
  • Memory 703 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.
  • the memory 703 may further include memory located remotely from the processor 701, and these remote memories may be connected to the electronic device through a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
  • the above-mentioned transmission device 705 is used for receiving or sending data via a network, and may also be used for data transmission between the processor and the memory. Specific examples of the above-mentioned networks may include wired networks and wireless networks.
  • the transmission device 705 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers through a network cable so as to communicate with the Internet or a local area network.
  • the transmission device 705 is a radio frequency (Radio Frequency, RF) module, which is used for wirelessly communicating with the Internet.
  • RF Radio Frequency
  • the memory 703 is used to store application programs.
  • the processor 701 can call the application program stored in the memory 703 through the transmission device 705 to perform the following steps:
  • a rendering frame diagram corresponding to the virtual scene is obtained, wherein the rendering frame diagram records the rendering process information and rendering resource information corresponding to the virtual scene, and the rendering process information is used to indicate rendering The rendering stage divided by the virtual scene and the rendering substage divided by each rendering stage, the rendering resource information is used to indicate that each rendering substage is allowed to use the rendering corresponding to the on-chip fragment cache of the graphics processor the resource status of the resource;
  • the virtual scene is rendered according to the target rendering process.
  • the rendering frame diagram records the resource status required to use the graphics processing unit (GPU) on-chip fragment cache as well as the divided rendering stages and sub-stages.
  • GPU graphics processing unit
  • creating a rendering process based on the rendering frame diagram for scene rendering can ensure rendering.
  • the process utilizes the optimal performance of the hardware to achieve the technical effect of improving the rendering efficiency of the virtual scene, thereby solving the technical problem of low rendering efficiency of the virtual scene.
  • FIG. 7 is only a schematic diagram, and the electronic device can be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a handheld computer, and a mobile Internet Device (Mobile Internet Devices, MID) , PAD and other equipment.
  • FIG. 7 does not limit the structure of the above electronic device.
  • the electronic device may also include more or fewer components than those shown in FIG. 7 (eg, network interface, display device, etc.), or have a different configuration than that shown in FIG. 7 .
  • Embodiments of the present application also provide a storage medium.
  • the above-mentioned storage medium may be used to execute the program code of the rendering method of the virtual scene.
  • the foregoing storage medium may be located on at least one network device among multiple network devices in the network shown in the foregoing embodiment.
  • the storage medium is configured to store program codes for executing the following steps:
  • a rendering frame diagram corresponding to the virtual scene is obtained, wherein the rendering frame diagram records the rendering process information and rendering resource information corresponding to the virtual scene, and the rendering process information is used to indicate rendering The rendering stage divided by the virtual scene and the rendering substage divided by each rendering stage, the rendering resource information is used to indicate that each rendering substage is allowed to use the rendering corresponding to the on-chip fragment cache of the graphics processor the resource status of the resource;
  • the virtual scene is rendered according to the target rendering process.
  • the above-mentioned storage medium may include but is not limited to: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic Various media that can store program codes, such as discs or optical discs.
  • the integrated units in the above-mentioned embodiments are implemented in the form of software functional units and sold or used as independent products, they may be stored in the above-mentioned computer-readable storage medium.
  • the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art, or all or part of the technical solution, and the computer software product is stored in a storage medium,
  • Several instructions are included to cause one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the disclosed client may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative, for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components may be combined or Integration into another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of units or modules, and may be in electrical or other forms.
  • the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • Various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof.
  • a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all functions of some or all components of the virtual scene rendering apparatus according to the embodiment of the present invention.
  • the present invention can also be implemented as a program/instruction (eg, computer program/instruction and computer program product) for an apparatus or apparatus for performing some or all of the methods described herein.
  • Such programs/instructions implementing the present invention may be stored on a computer readable medium, or may exist in the form of one or more signals, such signals may be downloaded from an Internet website, or provided on a carrier signal, or in any form Available in other formats.
  • Computer-readable media includes both persistent and non-permanent, removable and non-removable media, and storage of information may be implemented by any method or technology.
  • Information may be computer readable instructions, data structures, modules of programs, or other data.
  • Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Flash Memory or other memory technology, Compact Disc Read Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, Magnetic tape cartridges, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices.
  • PRAM phase-change memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • RAM random access memory
  • ROM read only memory
  • EEPROM Electrically Erasable Programm
  • FIG. 8 schematically shows a computer apparatus/equipment/system that can implement a method for rendering a virtual scene according to the present invention
  • the computer apparatus/equipment/system including a processor 810 and a computer-readable medium in the form of a memory 820 .
  • Memory 820 is an example of a computer readable medium having storage space 830 for storing computer programs/instructions 831 .
  • the computer program/instruction 831 is executed by the processor 810, each step in the method for rendering a virtual scene described above can be implemented.
  • Figure 9 schematically shows a block diagram of a computer program product implementing the method according to the invention.
  • the computer program product includes a computer program/instructions 910 that, when executed by a processor, such as the processor 810 shown in FIG. 8, can implement a virtual scene described above. The various steps in the rendering method.

Abstract

A method and apparatus for rendering a virtual scene. The method comprises: when rendering a virtual scene, acquiring a rendering frame graph corresponding to the virtual scene, wherein rendering process information and rendering resource information corresponding to the virtual scene are recorded in the rendering frame graph, the rendering process information being used for indicating render passes divided for rendering the virtual scene and sub render passes into which each render pass is divided, and the rendering resource information being used for indicating a resource state of a rendering resource corresponding to an on-chip tile buffer, which is allowed to be used in each sub render pass, of a graphics processing unit (S202); according to the rendering frame graph, creating a target rendering process corresponding to the virtual scene, wherein a target rendering resource used in the target rendering process satisfies the resource state indicated by the rendering resource information (S204); and rendering the virtual scene according to the target rendering process (S206). By means of the method, the technical problem of the rendering efficiency of a virtual scene being relatively low is solved.

Description

一种虚拟场景的渲染方法和装置Rendering method and device for virtual scene
交叉引用cross reference
本申请要求2020年12月18日递交的、申请号为“202011501111.2”、发明名称为“一种虚拟场景的渲染方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on December 18, 2020 with the application number "202011501111.2" and the invention titled "A method and device for rendering a virtual scene", the entire contents of which are incorporated herein by reference middle.
技术领域technical field
本发明涉及计算机领域,尤其涉及一种虚拟场景的渲染方法和装置。The present invention relates to the field of computers, and in particular, to a method and device for rendering a virtual scene.
背景技术Background technique
目前渲染虚拟场景的过程通常是先抽象出引擎的渲染器接口,然后根据不同类型的渲染接口实现渲染器。这种实现是把特殊转换至通用化,使用一套通用的代码去实现通用的渲染流程,由于这种实现方式需要兼容渲染接口比较低的版本,而支持比较低版本的渲染接口会造成系统运行的累赘,无法针对硬件的特点发挥系统硬件的最大性能,导致虚拟场景的渲染效率较低。The current process of rendering a virtual scene is usually to first abstract the renderer interface of the engine, and then implement the renderer according to different types of rendering interfaces. This implementation is to convert special to general, and use a set of general code to realize the general rendering process, because this implementation needs to be compatible with the lower version of the rendering interface, and supporting the lower version of the rendering interface will cause the system to run. Therefore, it is impossible to exert the maximum performance of the system hardware according to the characteristics of the hardware, resulting in low rendering efficiency of the virtual scene.
针对上述的问题,目前尚未提出有效的解决方案。For the above problems, no effective solution has been proposed yet.
发明内容SUMMARY OF THE INVENTION
本发明提出以下技术方案以克服或者至少部分地解决或者减缓上述问题:The present invention proposes the following technical solutions to overcome or at least partially solve or alleviate the above-mentioned problems:
根据本发明的一个方面,提供了一种虚拟场景的渲染方法,包括:According to an aspect of the present invention, there is provided a method for rendering a virtual scene, comprising:
在渲染虚拟场景时,获取所述虚拟场景对应的渲染框架图,其中,所述渲染框架图中记录了所述虚拟场景对应的渲染流程信息和渲染资源信息,所述渲染流程信息用于指示渲染所述虚拟场景所划分的渲染阶段和每个所述渲染阶段所划分的渲染子阶段,所述渲染资源信息用于指示允许每个渲染子阶段使用图形处理器的片上分片缓存所对应的渲染资源的资源状态;When rendering a virtual scene, a rendering frame diagram corresponding to the virtual scene is obtained, wherein the rendering frame diagram records the rendering process information and rendering resource information corresponding to the virtual scene, and the rendering process information is used to indicate rendering The rendering stage divided by the virtual scene and the rendering substage divided by each rendering stage, the rendering resource information is used to indicate that each rendering substage is allowed to use the rendering corresponding to the on-chip fragment cache of the graphics processor the resource status of the resource;
按照所述渲染框架图创建所述虚拟场景对应的目标渲染流程,其中,所述目标渲染流程中所使用的目标渲染资源满足所述渲染资源信息所指示的资源状态;Create a target rendering process corresponding to the virtual scene according to the rendering frame diagram, wherein the target rendering resource used in the target rendering process satisfies the resource state indicated by the rendering resource information;
按照所述目标渲染流程渲染所述虚拟场景。The virtual scene is rendered according to the target rendering process.
根据本发明的另一个方面,提供了一种虚拟场景的渲染装置,包括:According to another aspect of the present invention, a device for rendering a virtual scene is provided, comprising:
获取模块,用于在渲染虚拟场景时,获取所述虚拟场景对应的渲染框架图,其中,所述渲染框架图中记录了所述虚拟场景对应的渲染流程信息和渲染资源信息,所述渲染流程信息用于指示渲染所述虚拟场景所划分的渲染阶段和每个所述渲染阶段所划分的渲染子阶段,所述渲染资源信息用于指示允许每个渲染子阶段使用图形处理器的片上分片缓存所对应的渲染资源的资源状态;An acquisition module, configured to acquire a rendering frame diagram corresponding to the virtual scene when rendering the virtual scene, wherein the rendering frame diagram records the rendering process information and rendering resource information corresponding to the virtual scene, and the rendering process The information is used to indicate the rendering stage divided for rendering the virtual scene and the rendering substage divided by each of the rendering stages, and the rendering resource information is used to indicate that each rendering substage is allowed to use the on-chip slice of the graphics processor The resource status of the rendering resource corresponding to the cache;
第一创建模块,用于按照所述渲染框架图创建所述虚拟场景对应的目标渲染流程,其中,所述目标渲染流程中所使用的目标渲染资源满足所述渲染资源信息所指示的资源状态;a first creation module, configured to create a target rendering process corresponding to the virtual scene according to the rendering frame diagram, wherein the target rendering resource used in the target rendering process satisfies the resource state indicated by the rendering resource information;
渲染模块,用于按照所述目标渲染流程渲染所述虚拟场景。A rendering module, configured to render the virtual scene according to the target rendering process.
根据本发明的又一个方面,提供了一种电子装置,包括存储器、处理器及存储在存储器上的计算机程序/指令,所述处理器执行所述计算机程序/指令时实现上述虚拟场景的渲染方法的步骤。According to another aspect of the present invention, an electronic device is provided, comprising a memory, a processor, and a computer program/instruction stored on the memory, the processor implementing the above-mentioned method for rendering a virtual scene when the computer program/instruction is executed A step of.
根据本发明的再一个方面,提供了一种计算机装置/设备/系统,包括存储器、处理器及存储在存储器上的计算机程序/指令,所述处理器执行所述计算机程序/指令时实现上述虚拟场景的渲染方法的步骤。According to yet another aspect of the present invention, there is provided a computer device/equipment/system, comprising a memory, a processor, and a computer program/instruction stored on the memory, the processor implements the above virtual when executing the computer program/instruction The steps of the rendering method of the scene.
根据本发明的再一个方面,提供了一种计算机可读介质,其上存储有计算机程序/指令,所述计算机程序/指令被处理器执行时实现上述虚拟场景的渲染方法的步骤。According to yet another aspect of the present invention, a computer-readable medium is provided, on which computer programs/instructions are stored, and when the computer programs/instructions are executed by a processor, implement the steps of the above-mentioned method for rendering a virtual scene.
根据本发明的再一个方面,提供了一种计算机程序产品,包括计算机程序/指令,所述计算机程序/指令被处理器执行时实现上述虚拟场景的渲染方法的步骤。According to yet another aspect of the present invention, a computer program product is provided, comprising computer programs/instructions, when the computer programs/instructions are executed by a processor, the steps of the above method for rendering a virtual scene are implemented.
在本申请实施例中,采用在渲染虚拟场景时,获取虚拟场景对应的渲染框架图,其中,渲染框架图中记录了虚拟场景对应的渲染流程 信息和渲染资源信息,渲染流程信息用于指示渲染虚拟场景所划分的渲染阶段和每个渲染阶段所划分的渲染子阶段,渲染资源信息用于指示允许每个渲染子阶段使用图形处理器的片上分片缓存所对应的渲染资源的资源状态;按照渲染框架图创建虚拟场景对应的目标渲染流程,其中,目标渲染流程中所使用的目标渲染资源满足渲染资源信息所指示的资源状态;按照目标渲染流程渲染虚拟场景的方式,渲染框架图中记录了使用图形处理器(GPU)片上分片缓存所需满足的资源状态以及划分的渲染阶段和子阶段,在渲染虚拟场景时根据该渲染框架图创建渲染流程进行场景渲染能够确保渲染过程发挥硬件的最优性能,达到了提高虚拟场景的渲染效率的技术效果,进而解决了虚拟场景的渲染效率较低的技术问题。In the embodiment of the present application, when rendering a virtual scene, a rendering frame diagram corresponding to the virtual scene is obtained, wherein the rendering frame diagram records the rendering process information and rendering resource information corresponding to the virtual scene, and the rendering process information is used to indicate rendering. The rendering stage divided by the virtual scene and the rendering substage divided by each rendering stage, and the rendering resource information is used to indicate the resource status of the rendering resource corresponding to the on-chip fragment cache of the graphics processor that allows each rendering substage; according to The rendering frame diagram creates the target rendering process corresponding to the virtual scene, wherein the target rendering resources used in the target rendering process satisfy the resource state indicated by the rendering resource information; according to the way of rendering the virtual scene in the target rendering process, the rendering frame diagram records the Use the resource state required by the graphics processing unit (GPU) on-chip shard cache and the divided rendering stages and sub-stages. When rendering a virtual scene, create a rendering process according to the rendering frame diagram for scene rendering, which can ensure that the rendering process is optimized for the hardware. The technical effect of improving the rendering efficiency of the virtual scene is achieved, thereby solving the technical problem of low rendering efficiency of the virtual scene.
附图说明Description of drawings
通过阅读下文优选实施方式的详细描述,本发明的上述及各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。在附图中:The above and various other advantages and benefits of the present invention will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. In the attached image:
图1是根据本申请实施例的虚拟场景的渲染方法的硬件环境的示意图;1 is a schematic diagram of a hardware environment of a method for rendering a virtual scene according to an embodiment of the present application;
图2是根据本申请实施例的一种可选的虚拟场景的渲染方法的流程图;2 is a flowchart of an optional virtual scene rendering method according to an embodiment of the present application;
图3是根据本申请可选的实施方式的一种虚拟场景的渲染过程的示意图;3 is a schematic diagram of a rendering process of a virtual scene according to an optional embodiment of the present application;
图4是根据本申请实施例的一种构建渲染框架图的示意图;4 is a schematic diagram of constructing a rendering frame diagram according to an embodiment of the present application;
图5是根据本申请可选实施例的一种基于Vulkan构建渲染框架图的过程的示意图;5 is a schematic diagram of a process of constructing a rendering frame diagram based on Vulkan according to an optional embodiment of the present application;
图6是根据本申请实施例的一种可选的虚拟场景的渲染装置的示意图;6 is a schematic diagram of an optional virtual scene rendering apparatus according to an embodiment of the present application;
图7是根据本申请实施例的一种电子装置的结构框图;7 is a structural block diagram of an electronic device according to an embodiment of the present application;
图8是根据本申请实施例的一种计算机装置/设备/系统的示意图;8 is a schematic diagram of a computer apparatus/equipment/system according to an embodiment of the present application;
图9是根据本申请实施例的一种计算机程序产品的框图。Figure 9 is a block diagram of a computer program product according to an embodiment of the present application.
具体实施方式Detailed ways
下面结合附图和具体的实施方式对本发明作进一步的描述。以下描述仅为说明本发明的基本原理而并非对其进行限制。The present invention will be further described below with reference to the accompanying drawings and specific embodiments. The following description is merely illustrative of the basic principles of the present invention and is not intended to limit it.
根据本申请实施例的一方面,提供了一种虚拟场景的渲染的方法实施例。According to an aspect of the embodiments of the present application, an embodiment of a method for rendering a virtual scene is provided.
可选地,在本实施例中,上述虚拟场景的渲染方法可以应用于如图1所示的由终端101和服务器103所构成的硬件环境中。如图1所示,服务器103通过网络与终端101进行连接,可用于为终端或终端上安装的客户端提供服务(如游戏服务、应用服务等),可在服务器上或独立于服务器设置数据库,用于为服务器103提供数据存储服务,上述网络包括但不限于:广域网、城域网或局域网,终端101并不限定于PC、手机、平板电脑等。本申请实施例的虚拟场景的渲染方法可以由服务器103来执行,也可以由终端101来执行,还可以是由服务器103和终端101共同执行。其中,终端101执行本申请实施例的虚拟场景的渲染方法也可以是由安装在其上的客户端来执行。Optionally, in this embodiment, the foregoing virtual scene rendering method may be applied to a hardware environment composed of a terminal 101 and a server 103 as shown in FIG. 1 . As shown in FIG. 1 , the server 103 is connected to the terminal 101 through the network, and can be used to provide services (such as game services, application services, etc.) for the terminal or the client installed on the terminal, and a database can be set on the server or independently of the server, For providing data storage services for the server 103, the above-mentioned network includes but is not limited to: a wide area network, a metropolitan area network or a local area network, and the terminal 101 is not limited to a PC, a mobile phone, a tablet computer, and the like. The method for rendering a virtual scene in this embodiment of the present application may be executed by the server 103 , may also be executed by the terminal 101 , or may be executed jointly by the server 103 and the terminal 101 . Wherein, the terminal 101 may execute the rendering method of the virtual scene of the embodiment of the present application by a client installed on the terminal 101 .
图2是根据本申请实施例的一种可选的虚拟场景的渲染方法的流程图,如图2所示,该方法可以包括以下步骤:FIG. 2 is a flowchart of an optional virtual scene rendering method according to an embodiment of the present application. As shown in FIG. 2 , the method may include the following steps:
步骤S202,在渲染虚拟场景时,获取所述虚拟场景对应的渲染框架图,其中,所述渲染框架图中记录了所述虚拟场景对应的渲染流程信息和渲染资源信息,所述渲染流程信息用于指示渲染所述虚拟场景所划分的渲染阶段和每个所述渲染阶段所划分的渲染子阶段,所述渲染资源信息用于指示允许每个渲染子阶段使用图形处理器的片上分片缓存所对应的渲染资源的资源状态;Step S202, when rendering the virtual scene, obtain a rendering frame diagram corresponding to the virtual scene, wherein the rendering frame diagram records the rendering process information and rendering resource information corresponding to the virtual scene, and the rendering process information is used In order to instruct the rendering stage divided into rendering the virtual scene and the rendering substage divided by each of the rendering stages, the rendering resource information is used to indicate that each rendering substage is allowed to use the on-chip fragment cache of the graphics processor. The resource status of the corresponding rendering resource;
步骤S204,按照所述渲染框架图创建所述虚拟场景对应的目标渲染流程,其中,所述目标渲染流程中所使用的目标渲染资源满足所述渲染资源信息所指示的资源状态;Step S204, creating a target rendering process corresponding to the virtual scene according to the rendering frame diagram, wherein the target rendering resource used in the target rendering process satisfies the resource state indicated by the rendering resource information;
步骤S206,按照所述目标渲染流程渲染所述虚拟场景。Step S206, rendering the virtual scene according to the target rendering process.
通过上述步骤S202至步骤S206,渲染框架图中记录了使用图形处理器(GPU)片上分片缓存所需满足的资源状态以及划分的渲染阶段和子阶段,在渲染虚拟场景时根据该渲染框架图创建渲染流程进行场景渲染能够确保渲染过程发挥硬件的最优性能,达到了提高虚拟场景的渲染效率的技术效果,进而解决了虚拟场景的渲染效率较低的技术问题。Through the above steps S202 to S206, the rendering frame diagram records the resource states required to use the graphics processing unit (GPU) on-chip fragment cache and the divided rendering stages and sub-stages. When rendering the virtual scene, the rendering frame diagram creates Rendering the scene in the rendering process can ensure that the rendering process exerts the optimal performance of the hardware, achieves the technical effect of improving the rendering efficiency of the virtual scene, and solves the technical problem of low rendering efficiency of the virtual scene.
在步骤S202提供的技术方案中,上述虚拟场景可以但不限于包括:游戏场景,虚拟现实(VR)场景,动画场景,模拟器场景等等。比如:在手机安卓(Android)系统中渲染游戏场景,在PC计算机的安卓(Android)系统中渲染动画场景等等。In the technical solution provided in step S202, the above-mentioned virtual scene may include, but is not limited to, a game scene, a virtual reality (VR) scene, an animation scene, a simulator scene, and the like. For example, a game scene is rendered in the Android system of a mobile phone, an animation scene is rendered in the Android system of a PC computer, and so on.
可选地,在本实施例中,上述渲染框架图(frame graph)中记录了虚拟场景对应的渲染流程信息和渲染资源信息,渲染流程信息用于指示渲染虚拟场景所划分的渲染阶段(render pass)和每个渲染阶段所划分的渲染子阶段(sub render pass),渲染资源信息用于指示允许每个渲染子阶段使用图形处理器(Graphics Processing Unit,GPU)的片上分片缓存(Tile Buffer)所对应的渲染资源的资源状态。在渲染资源信息中标记了使用GPU的片上分片缓存所需要的渲染资源的资源状态,从而使得创建的渲染流程能够调用GPU的片上分片缓存,充分发挥GPU的渲染性能,提高渲染效率。Optionally, in this embodiment, the rendering process information and rendering resource information corresponding to the virtual scene are recorded in the above-mentioned rendering frame graph, and the rendering process information is used to indicate the rendering stage (render pass) divided by the rendering of the virtual scene. ) and the rendering sub-stage (sub render pass) divided by each rendering stage, the rendering resource information is used to indicate that each rendering sub-stage is allowed to use the on-chip tile buffer (Tile Buffer) of the graphics processor (Graphics Processing Unit, GPU). The resource status of the corresponding rendering resource. The resource status of the rendering resources required to use the GPU's on-chip shard cache is marked in the rendering resource information, so that the created rendering process can call the GPU's on-chip shard cache, giving full play to the rendering performance of the GPU and improving rendering efficiency.
可选地,在本实施例中,渲染框架图中记录的渲染流程信息指示了渲染虚拟场景所划分的渲染阶段和每个渲染阶段所划分的渲染子阶段,每个渲染子阶段(sub render pass)在传统的划分方式中可能是一个渲染阶段(render pass),比如:一个传统的渲染流程可能包括两个render pass:Geometry render pass和Lighting render pass,在上述渲染框架图(frame graph)中,则将这两个render pass记为两个sub render pass:Geometry sub render pass和Lighting sub render pass,这两个sub render pass组成frame graph中的一个render pass。Optionally, in this embodiment, the rendering process information recorded in the rendering frame diagram indicates the rendering stage divided into rendering the virtual scene and the rendering substage divided by each rendering stage, and each rendering substage (sub render pass) ) may be a rendering pass in the traditional division method. For example, a traditional rendering process may include two render passes: Geometry render pass and Lighting render pass. In the above rendering frame graph (frame graph), The two render passes are recorded as two sub render passes: Geometry sub render pass and Lighting sub render pass. These two sub render passes form a render pass in the frame graph.
可选地,在本实施例中,渲染流程信息所指示的渲染虚拟场景所划分的渲染阶段和每个渲染阶段所划分的渲染子阶段可以但不限于是根据允许每个渲染子阶段使用图形处理器的片上分片缓存所对应的渲染资源的资源状态所划分的,可以将原有渲染过程中满足使用图形处理器的片上分片缓存所对应的渲染资源的资源状态要求的渲染阶段作为渲染子阶段合并为新的渲染阶段。比如:由于上述Geometry render pass和Lighting render pass能够满足使用图形处理器的片上分片缓存所对应的渲染资源的资源状态要求,因此可以将上述Geometry render pass和Lighting render pass分别作为Geometry sub render pass和Lighting sub render pass合并为一个render pass。Optionally, in this embodiment, the rendering stage and the rendering sub-stage divided into the rendering virtual scene indicated by the rendering process information and each rendering stage may be, but are not limited to, according to allowing each rendering sub-stage to use graphics processing. According to the resource status of the rendering resources corresponding to the on-chip fragment cache of the graphics processor, the rendering stage that meets the resource status requirements of the rendering resources corresponding to the on-chip fragment cache of the graphics processor in the original rendering process can be used as the rendering sub-stage. The stages are merged into a new render stage. For example, since the above Geometry render pass and Lighting render pass can meet the resource status requirements of rendering resources corresponding to the on-chip shard cache using the graphics processor, the above Geometry render pass and Lighting render pass can be used as Geometry sub render pass and Lighting sub render passes are combined into one render pass.
可选地,在本实施例中,允许使用图形处理器的片上分片缓存所 对应的渲染资源的资源状态可以但不限于包括:渲染目标尺寸,渲染目标格式,加载状态(load action),存储状态(store action)和临时使用状态等等。加载状态(load action)可以但不限于包括:load(加载),clear(清除上一次内容)和don’t care(不关心之前内容)等等。存储状态(store action)可以但不限于包括store(存储内容),clear(清除上一次内容)和don’t care(不关心之前内容)等等。临时使用状态可以但不限于包括分片缓存(tile buffer)。Optionally, in this embodiment, the resource state of the rendering resource corresponding to the on-chip fragment cache that is allowed to use the graphics processor may include, but is not limited to, the size of the rendering target, the format of the rendering target, the loading state (load action), the storage State (store action) and temporary use state, etc. The loading state (load action) can include but is not limited to: load (loading), clear (clear the last content) and don't care (don't care about the previous content) and so on. The store action can include, but is not limited to, store (store content), clear (clear the last content), don't care (don't care about the previous content), and so on. The temporary usage state may include, but is not limited to, tile buffers.
在步骤S204提供的技术方案中,按照渲染框架图所创建的该虚拟场景对应的目标渲染流程中所使用的目标渲染资源满足渲染资源信息所指示的资源状态,从而使得目标渲染流程能够充分发挥硬件所具有的性能优势,提高渲染速度和渲染效率。In the technical solution provided in step S204, the target rendering resource used in the target rendering process corresponding to the virtual scene created according to the rendering frame diagram satisfies the resource state indicated by the rendering resource information, so that the target rendering process can give full play to the hardware The performance advantages it has, improve rendering speed and rendering efficiency.
在步骤S206提供的技术方案中,按照目标渲染流程渲染虚拟场景即按照划分的渲染阶段和渲染子阶段使用创建好的渲染资源渲染虚拟场景,在渲染过程中,能够使用到GPU的分片缓存,从而提高渲染效率。In the technical solution provided in step S206, rendering the virtual scene according to the target rendering process is to use the created rendering resources to render the virtual scene according to the divided rendering stages and rendering sub-stages. During the rendering process, the slice cache of the GPU can be used, Thereby improving rendering efficiency.
作为一种可选的实施例,按照所述渲染框架图创建所述虚拟场景对应的目标渲染流程包括:As an optional embodiment, creating a target rendering process corresponding to the virtual scene according to the rendering frame diagram includes:
S11,按照所述渲染资源信息为每个渲染子阶段创建满足所述资源状态的所述目标渲染资源;S11, creating the target rendering resource that satisfies the resource state for each rendering sub-stage according to the rendering resource information;
S12,按照所述渲染流程信息创建所述目标渲染资源之间的所述目标渲染流程。S12. Create the target rendering process between the target rendering resources according to the rendering process information.
可选地,在本实施例中,首先创建每个渲染子阶段的目标渲染资源,再将各个渲染子阶段的目标渲染资源之间连接起来得到目标渲染流程。Optionally, in this embodiment, the target rendering resources of each rendering sub-stage are first created, and then the target rendering resources of each rendering sub-stage are connected to obtain the target rendering process.
可选地,在本实施例中,为每个渲染子阶段创建的目标渲染资源需要满足渲染资源信息所指示的资源状态才能够保证其在执行渲染流程的过程中使用到GPU的分片缓存。Optionally, in this embodiment, the target rendering resource created for each rendering sub-stage needs to satisfy the resource state indicated by the rendering resource information to ensure that it uses the GPU's fragment cache during the rendering process.
在一个可选的实施方式中,提供了一个针对手机Vulkan渲染器系统使用GPU的Tile Buffer渲染虚拟场景的过程。图3是根据本申请可选的实施方式的一种虚拟场景的渲染过程的示意图,如图3所示,首先根据项目需求配置不同渲染系统的渲染框架图(Frame Graph),比如:项目是在手机Vulkan渲染器系统下的手机游戏,则配置在手机 Vulkan渲染器系统下使用手机GPU片上分片缓存的渲染框架图。然后根据配置的渲染框架图创建图形处理器(GPU)资源及配置资源状态使得创建的资源能够满足使用手机GPU片上分片缓存的要求,再根据配置的渲染框架图创建一帧的渲染流程,根据创建的渲染流程渲染虚拟场景,从而实现游戏画面的呈现。In an optional embodiment, a process of rendering a virtual scene using the GPU's Tile Buffer for the Vulkan renderer system of a mobile phone is provided. FIG. 3 is a schematic diagram of a rendering process of a virtual scene according to an optional embodiment of the present application. As shown in FIG. 3 , first, the rendering frame graphs (Frame Graphs) of different rendering systems are configured according to project requirements. For mobile games under the Vulkan renderer system of the mobile phone, the rendering frame diagram using the on-chip shard cache of the GPU of the mobile phone is configured under the Vulkan renderer system of the mobile phone. Then create graphics processor (GPU) resources according to the configured rendering frame diagram and configure the resource status so that the created resources can meet the requirements of using the on-chip shard cache of the mobile phone GPU, and then create a frame rendering process according to the configured rendering frame diagram. The created rendering process renders the virtual scene, thereby realizing the presentation of the game screen.
作为一种可选的实施例,按照所述渲染资源信息为每个渲染子阶段创建满足所述资源状态的所述目标渲染资源包括:As an optional embodiment, creating the target rendering resource that satisfies the resource state for each rendering sub-stage according to the rendering resource information includes:
S21,构建满足所述渲染资源信息所指示的渲染目标尺寸和渲染目标格式的第一渲染目标;S21, constructing a first rendering target that satisfies the rendering target size and rendering target format indicated by the rendering resource information;
S22,将所述第一渲染目标的加载状态和存储状态配置为所述渲染资源信息所指示的目标加载状态和目标存储状态,得到第二渲染目标;S22, configuring the loading state and storage state of the first rendering target to be the target loading state and the target storage state indicated by the rendering resource information, to obtain a second rendering target;
S23,将所述第二渲染目标的图形处理器存储状态标记为所述渲染资源信息所指示的分片缓存状态,得到所述目标渲染资源。S23: Mark the graphics processor storage state of the second rendering target as the fragment cache state indicated by the rendering resource information, and obtain the target rendering resource.
可选地,在本实施例中,构建的渲染资源可以但不限于包括满足要求的渲染目标(Render Target),渲染目标需满足的要求可以但不限于包括渲染目标尺寸,渲染目标格式和图形处理器存储状态的要求,即如果需要使用GPU的分片缓存,首先需要把渲染流程划分为渲染子阶段,其次需要配置Render Target的尺寸,格式和GPU存储状态满足调用GPU的分片缓存的要求。渲染目标的加载状态和存储状态可以根据渲染过程中的实际需求来配置。Optionally, in this embodiment, the constructed rendering resource may include, but is not limited to, a rendering target (Render Target) that meets the requirements, and the requirements that the rendering target needs to meet may include, but are not limited to, the size of the rendering target, the format of the rendering target, and the graphics processing. That is, if you need to use the GPU's shard cache, you first need to divide the rendering process into rendering sub-stages, and secondly, you need to configure the size, format and GPU storage state of the Render Target to meet the requirements of calling the GPU's shard cache. The loading state and storage state of the render target can be configured according to the actual needs of the rendering process.
可选地,在本实施例中,通过上述过程创建的渲染资源能够使得渲染流程的硬件环境达到最优,即硬件会尽最大可能使用片上(On-Chip)缓存(Tile Buffer),即最小化Tile Buffer至内存(显存),内存(显存)至Tile Buffer的读写操作。因为硬件Tile Buffer与内存(显存)之间操作是有延时的。尽最大可能使用片上缓存能够降低这种延时,提高渲染效率。Optionally, in this embodiment, the rendering resources created through the above process can optimize the hardware environment of the rendering process, that is, the hardware will use the on-chip (On-Chip) cache (Tile Buffer) as much as possible, that is, minimize the hardware environment. Tile Buffer to memory (video memory), memory (video memory) to Tile Buffer read and write operations. Because there is a delay in the operation between the hardware Tile Buffer and the memory (video memory). Using the on-chip cache as much as possible can reduce this latency and improve rendering efficiency.
作为一种可选的实施例,获取所述虚拟场景对应的渲染框架图包括:As an optional embodiment, acquiring the rendering frame diagram corresponding to the virtual scene includes:
S31,获取所述虚拟场景的场景信息;S31, obtaining scene information of the virtual scene;
S32,从多个场景条件中获取所述场景信息所满足的目标场景条件,其中,所述多个场景条件与多个渲染框架图一一对应;S32, acquiring target scene conditions satisfied by the scene information from multiple scene conditions, wherein the multiple scene conditions are in one-to-one correspondence with multiple rendering framework diagrams;
S33,将所述目标场景条件所对应的渲染框架图确定为所述虚拟场 景对应的渲染框架图。S33: Determine the rendering frame diagram corresponding to the target scene condition as the rendering frame diagram corresponding to the virtual scene.
可选地,在本实施例中,可以为不同类型的场景配置不同的渲染框架图,将当前的虚拟场景所满足的场景条件对应的渲染框架图作为渲染当前场景的渲染框架图。Optionally, in this embodiment, different rendering frame graphs may be configured for different types of scenes, and the rendering frame graph corresponding to the scene condition satisfied by the current virtual scene is used as the rendering frame graph for rendering the current scene.
比如:图4是根据本申请实施例的一种构建渲染框架图的示意图,如图4所示,预先创建了多个渲染框架图Frame Graph,其中的一个渲染框架图Frame Graph 1包括三个渲染目标(Render Target 11,Render Target 12和Render Target 13),从Render Target 11到Render Target 12被划分为一个渲染子阶段Sub render pass 11,从Render Target 12到Render Target 13被划分为另一个渲染子阶段Sub render pass 12。另一个渲染框架图Frame Graph 2包括五个渲染目标(Render Target 21,Render Target 22,Render Target 23,Render Target 24和Render Target 25),从Render Target 21分别到Render Target 22,Render Target 23和Render Target 24被划分为一个渲染子阶段Sub render pass 21,分别从Render Target 22,Render Target 23和Render Target 24到Render Target 25被划分为另一个渲染子阶段Sub render pass 22。每一个渲染框架图对应了一种场景条件,符合该场景条件的虚拟场景可以使用对应的渲染框架图进行渲染。比如:Frame Graph 1对应的场景条件为不需要渲染光照效果,Frame Graph 2对应的场景条件为需要渲染光照效果,那么如果待渲染的虚拟场景需要渲染光照效果则可以使用Frame Graph 2进行渲染,如果待渲染的虚拟场景不需要渲染光照效果则可以使用Frame Graph 1进行渲染。For example: FIG. 4 is a schematic diagram of constructing a rendering frame graph according to an embodiment of the present application. As shown in FIG. 4 , multiple rendering frame graphs Frame Graph are pre-created, and one rendering frame graph Frame Graph 1 includes three rendering frame graphs. Targets (Render Target 11, Render Target 12 and Render Target 13), from Render Target 11 to Render Target 12 are divided into a render sub pass Sub render pass 11, from Render Target 12 to Render Target 13 is divided into another render sub pass Stage Sub render pass 12. Another rendering frame graph Frame Graph 2 includes five render targets (Render Target 21, Render Target 22, Render Target 23, Render Target 24 and Render Target 25), from Render Target 21 to Render Target 22, Render Target 23 and Render respectively Target 24 is divided into a rendering sub-stage Sub render pass 21, respectively from Render Target 22, Render Target 23 and Render Target 24 to Render Target 25 are divided into another rendering sub-stage Sub render pass 22. Each rendering frame diagram corresponds to a scene condition, and virtual scenes that meet the scene conditions can be rendered using the corresponding rendering frame diagram. For example: the scene condition corresponding to Frame Graph 1 is that no lighting effect needs to be rendered, and the scene condition corresponding to Frame Graph 2 is that lighting effects need to be rendered, then if the virtual scene to be rendered needs to render lighting effects, you can use Frame Graph 2 for rendering, if The virtual scene to be rendered does not need to render lighting effects and can be rendered using Frame Graph 1.
作为一种可选的实施例,在获取所述虚拟场景对应的渲染框架图之前,还包括:As an optional embodiment, before acquiring the rendering frame diagram corresponding to the virtual scene, the method further includes:
S41,将所述虚拟场景的渲染流程划分为渲染阶段和渲染子阶段,得到所述渲染流程信息;S41, dividing the rendering process of the virtual scene into a rendering stage and a rendering sub-stage, and obtaining the rendering process information;
S42,配置每个渲染子阶段所包括的渲染目标和渲染目标信息,得到所述渲染资源信息,其中,所述渲染目标信息包括渲染目标尺寸,渲染目标格式,加载状态,存储状态和临时使用状态,所述临时使用状态用于指示允许所述每个渲染子阶段使用图形处理器的片上分片缓存;S42, configure the rendering target and rendering target information included in each rendering sub-stage, and obtain the rendering resource information, where the rendering target information includes the rendering target size, the rendering target format, the loading state, the storage state and the temporary use state , the temporary use state is used to indicate that each rendering sub-stage is allowed to use the on-chip fragment cache of the graphics processor;
S43,使用所述渲染流程信息和所述渲染资源信息创建所述渲染框 架图。S43, using the rendering process information and the rendering resource information to create the rendering frame diagram.
可选地,在本实施例中,在渲染虚拟场景之前,可以但不限于先根据项目需求创建能够发挥硬件最优性能的渲染框架图。Optionally, in this embodiment, before rendering the virtual scene, a rendering frame diagram capable of exerting the optimal performance of the hardware may be created, but not limited to, according to project requirements.
可选地,在本实施例中,渲染阶段和渲染子阶段的划分过程可以但不限于是根据能够达到最优硬件环境的需求将原渲染流程中的渲染阶段配置为渲染子阶段,再将配置的渲染子阶段组成渲染阶段。Optionally, in this embodiment, the division process of the rendering stage and the rendering sub-stage may be, but is not limited to, configuring the rendering stage in the original rendering process as a rendering sub-stage according to the requirements of achieving an optimal hardware environment, and then configuring the rendering stage. The rendering sub-stages of the Render stage make up the rendering stage.
可选地,在本实施例中,渲染目标即Render Target,渲染目标信息包括:能够达到最优硬件环境所需要的渲染目标的渲染目标尺寸,渲染目标格式和临时使用状态,其中,该临时使用状态用于指示允许每个渲染子阶段使用图形处理器的片上分片缓存,以及根据项目需求配置的渲染目标的加载状态和存储状态。Optionally, in this embodiment, the rendering target is the Render Target, and the rendering target information includes: the rendering target size, the rendering target format and the temporary use state that can achieve the rendering target required by the optimal hardware environment, wherein the temporary use State is used to indicate the on-chip shard cache that allows each rendering substage to use the GPU's on-chip shard cache, as well as the load state and store state of the render target configured according to the project's needs.
作为一种可选的实施例,配置每个渲染子阶段所包括的渲染目标和渲染目标信息包括:As an optional embodiment, configuring the rendering target and rendering target information included in each rendering sub-stage includes:
S51,构建每个渲染子阶段所包括的渲染目标;S51, constructing rendering targets included in each rendering sub-stage;
S52,将所述渲染目标的渲染目标尺寸和渲染目标格式配置为允许使用所述图形处理器的片上分片缓存的渲染目标尺寸和渲染目标格式;S52, configuring the rendering target size and rendering target format of the rendering target to allow the use of the rendering target size and rendering target format of the on-chip fragment cache of the graphics processor;
S53,将所述渲染目标的加载状态和存储状态配置为满足所述虚拟场景要求的加载状态和存储状态;S53, configuring the loading state and storage state of the rendering target to meet the loading state and storage state required by the virtual scene;
S54,将所述渲染目标的图形处理器的片上存储状态标记为分片缓存。S54, marking the on-chip storage state of the graphics processor of the rendering target as a slice cache.
可选地,在本实施例中,渲染目标尺寸和渲染目标格式配置为允许使用图形处理器的片上分片缓存的渲染目标尺寸和渲染目标格式。也就是说,使用图形处理器的片上分片缓存需要渲染目标满足一定的尺寸和格式要求。Optionally, in this embodiment, the render target size and the render target format are configured to allow the use of the render target size and render target format of the on-chip fragment cache of the graphics processor. That is, using the GPU's on-chip fragment cache requires the render target to meet certain size and format requirements.
可选地,在本实施例中,渲染目标的加载状态和存储状态可以但不限于由虚拟场景要求来确定。Optionally, in this embodiment, the loading state and storage state of the rendering target may be determined by, but not limited to, the requirements of the virtual scene.
可选地,在本实施例中,将渲染目标的图形处理器的片上存储状态标记为分片缓存的方式可以但不限于包括在为VulkanMobileRenderTarget分配显存时,指定分配显存方式加上VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT这一位,如此便能使用Android片上缓存,达到降低带宽的效果。Optionally, in this embodiment, the way of marking the on-chip storage state of the graphics processor of the rendering target as the slice cache may include, but is not limited to, when allocating video memory for VulkanMobileRenderTarget, specifying the way of allocating video memory plus the bit of VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT. , so that the Android on-chip cache can be used to reduce the bandwidth.
作为一种可选的实施例,将所述虚拟场景的渲染流程划分为渲染阶段和渲染子阶段包括:As an optional embodiment, dividing the rendering process of the virtual scene into a rendering stage and a rendering sub-stage includes:
S61,将所述虚拟场景的渲染流程中的几何渲染阶段配置为几何渲染子阶段,将光照渲染阶段配置为光照渲染子阶段;S61, configuring the geometric rendering stage in the rendering process of the virtual scene as a geometric rendering sub-stage, and configuring the lighting rendering stage as a lighting rendering sub-stage;
S62,将所述几何渲染子阶段和所述光照渲染子阶段合并为渲染阶段。S62. Combine the geometry rendering sub-stage and the lighting rendering sub-stage into a rendering stage.
可选地,在本实施例中,首先原渲染流程中能够配置为渲染子阶段的渲染阶段配置为渲染子阶段,再将配置的渲染子阶段合并为渲染阶段。Optionally, in this embodiment, first, a rendering stage that can be configured as a rendering substage in the original rendering process is configured as a rendering substage, and then the configured rendering substages are combined into a rendering stage.
比如:将几何渲染阶段(Geometry Pass)配置为几何渲染子阶段(Geometry SubPass),将光照渲染阶段(Lighting Pass)配置为光照渲染子阶段(Lighting SubPass),再将几何渲染子阶段(Geometry SubPass)和光照渲染子阶段(Lighting SubPass)合并为渲染阶段。For example: configure the Geometry Pass as a Geometry SubPass, configure the Lighting Pass as a Lighting SubPass, and then configure the Geometry SubPass Combined with the Lighting SubPass into a render pass.
作为一种可选的实施例,配置每个渲染子阶段所包括的渲染目标和渲染目标信息包括:As an optional embodiment, configuring the rendering target and rendering target information included in each rendering sub-stage includes:
S71,配置所述几何渲染子阶段的渲染目标包括位置渲染目标,法线渲染目标,反射率渲染目标和深度渲染目标,所述光照渲染子阶段的渲染目标包括光照渲染目标;S71, configuring the rendering targets of the geometry rendering sub-stage to include a position rendering target, a normal rendering target, a reflectivity rendering target and a depth rendering target, and the rendering targets of the lighting rendering sub-stage include a lighting rendering target;
S72,将所述位置渲染目标,所述法线渲染目标,所述反射率渲染目标,所述深度渲染目标和所述光照渲染目标的渲染目标尺寸标记为预设尺寸,渲染目标格式标记为预设格式;S72, mark the rendering target size of the position rendering target, the normal rendering target, the reflectivity rendering target, the depth rendering target and the lighting rendering target as a preset size, and mark the rendering target format as a preset size format;
S73,将所述位置渲染目标,法线渲染目标,反射率渲染目标和深度渲染目标的加载状态标记为清除上一次内容,存储状态标记为不关心之后内容,并将所述光照渲染目标的加载状态标记为不关心之后内容,存储状态标记为存储内容;S73, marking the loading status of the position rendering target, the normal rendering target, the reflectivity rendering target and the depth rendering target as clearing the last content, marking the storage status as not caring about the subsequent content, and loading the lighting rendering target The status is marked as not caring about the content after, and the storage status is marked as storage content;
S74,将所述位置渲染目标,所述法线渲染目标,所述反射率渲染目标,所述深度渲染目标和所述光照渲染目标的图形处理器的片上存储状态标记为分片缓存。S74: Mark the on-chip storage states of the position rendering target, the normal rendering target, the reflectivity rendering target, the depth rendering target, and the lighting rendering target as a slice cache.
可选地,在本实施例中,几何渲染子阶段的渲染目标包括位置渲染目标(position),法线渲染目标(normal),反射率渲染目标(albedo)和深度渲染目标(depth),光照渲染子阶段的渲染目标包括光照渲染目标(Lighting)。Optionally, in this embodiment, the rendering targets of the geometry rendering sub-stage include a position rendering target (position), a normal rendering target (normal), an albedo rendering target (albedo), a depth rendering target (depth), and a lighting rendering target. The render targets of the sub-stage include Lighting.
可选地,在本实施例中,上述预设尺寸和预设格式是使用GPU片上分片缓存所要求的渲染目标的尺寸和渲染目标的格式。Optionally, in this embodiment, the above-mentioned preset size and preset format are the size of the rendering target and the format of the rendering target required by using the GPU on-chip fragment cache.
可选地,在本实施例中,加载状态和存储状态可以根据虚拟场景的需求进行配置,比如:将位置渲染目标(position),法线渲染目标(normal),反射率渲染目标(albedo)和深度渲染目标(depth)的加载状态(load action)标记为清除上一次内容(clear),存储状态(store action)标记为不关心之后内容(don’t care),并将光照渲染目标(Lighting)的加载状态(load action)标记为不关心之后内容(don’t care),存储状态(store action)标记为存储内容(store)。Optionally, in this embodiment, the loading state and the storage state can be configured according to the requirements of the virtual scene, for example, the position rendering target (position), the normal rendering target (normal), the reflectance rendering target (albedo) and the The load state (load action) of the depth rendering target (depth) is marked as clearing the previous content (clear), the storage state (store action) is marked as do not care about the next content (don't care), and the lighting rendering target (Lighting) The load state (load action) is marked as don't care, and the store state (store action) is marked as store content (store).
可选地,在本实施例中,渲染目标的图形处理器的片上存储状态标记为分片缓存能够使得渲染过程充分使用到GPU的分片缓存。比如:将位置渲染目标(position),法线渲染目标(normal),反射率渲染目标(albedo),深度渲染目标(depth)和光照渲染目标(Lighting)的图形处理器的片上存储状态(GPU存储状态)标记为分片缓存(tile buffer)。Optionally, in this embodiment, the on-chip storage state of the graphics processor of the rendering target is marked as a slice cache, so that the rendering process can fully use the slice cache of the GPU. For example: the position, normal, albedo, depth, and lighting on-chip storage state of the graphics processor (GPU storage) state) is marked as a tile buffer.
本申请还提供了一种可选实施例,该可选实施例提供了一种使用Vulkan构建渲染框架图的过程。图5是根据本申请可选实施例的一种基于Vulkan构建渲染框架图的过程的示意图,如图5所示,在本可选实施例中,构建的渲染框架图为能够渲染出延迟光照(deferred lighting)效果的渲染框架图,首先原渲染流程构建的原渲染框架图中Geometry RenderPass分别渲染场景到position,normal,albedo,depth的Render Target上,再经过Lighting RenderPass进行光照计算到lighting的Render Target上。其配置了两个Render Pass(Geometry,Lighting),使用了五个GPU Render Target。The present application also provides an optional embodiment, which provides a process for building a rendering frame graph using Vulkan. FIG. 5 is a schematic diagram of a process of constructing a rendering frame graph based on Vulkan according to an optional embodiment of the present application. As shown in FIG. 5 , in this optional embodiment, the constructed rendering frame graph is capable of rendering deferred lighting ( deferred lighting) effect rendering frame diagram, first, Geometry RenderPass in the original rendering frame diagram constructed by the original rendering process renders the scene to the Render Target of position, normal, albedo, and depth respectively, and then passes the Lighting RenderPass to calculate the lighting to the Render Target of lighting superior. It is configured with two Render Passes (Geometry, Lighting) and uses five GPU Render Targets.
在本可选实施例中,将Geometry与Lighting合为一个Render Pass,其分别成为Sub Render Pass(即Geometry Sub Pass和Lighting Sub Pass),并且对上述五个render target的状态进行设置使得渲染过程能够高效地使用GPU的Tile Buffer。将position、normal、albedo、depth的加载状态(load action)配置为clear(清除上一次内容)、存储状态(store action)配置为don’t care(不关心之后内容),将Lighting的加载状态(load action)配置为don’t care(不关心之前内容),存储状态(store action)配置为store(存储内容)。并且将position、normal、albedo、 depth和Lighting的GPU存储状态标记为tile buffer,这样便能充分发挥GPU的硬件性能,从而得到目标渲染框架图。In this optional embodiment, Geometry and Lighting are combined into one Render Pass, which respectively becomes Sub Render Pass (ie Geometry Sub Pass and Lighting Sub Pass), and the states of the above five render targets are set so that the rendering process can Efficient use of GPU Tile Buffers. Configure the loading state (load action) of position, normal, albedo, and depth to clear (clear the last content), configure the storage state (store action) to don't care (don't care about the content afterward), and set the loading state of Lighting ( load action) is configured as don't care (don't care about the previous content), and the storage state (store action) is configured as store (stored content). And mark the GPU storage states of position, normal, albedo, depth and Lighting as tile buffers, so that the hardware performance of the GPU can be fully utilized to obtain the target rendering frame diagram.
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。It should be noted that, for the sake of simple description, the foregoing method embodiments are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited by the described action sequence. Because in accordance with the present application, certain steps may be performed in other orders or concurrently. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is better implementation. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence or in a part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, CD-ROM), including several instructions to make a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) execute the methods described in the various embodiments of this application.
根据本申请实施例的另一个方面,还提供了一种用于实施上述虚拟场景的渲染方法的虚拟场景的渲染装置。图6是根据本申请实施例的一种可选的虚拟场景的渲染装置的示意图,如图6所示,该装置可以包括:According to another aspect of the embodiments of the present application, there is also provided a virtual scene rendering apparatus for implementing the above virtual scene rendering method. FIG. 6 is a schematic diagram of an optional virtual scene rendering apparatus according to an embodiment of the present application. As shown in FIG. 6 , the apparatus may include:
获取模块62,用于在渲染虚拟场景时,获取所述虚拟场景对应的渲染框架图,其中,所述渲染框架图中记录了所述虚拟场景对应的渲染流程信息和渲染资源信息,所述渲染流程信息用于指示渲染所述虚拟场景所划分的渲染阶段和每个所述渲染阶段所划分的渲染子阶段,所述渲染资源信息用于指示允许每个渲染子阶段使用图形处理器的片上分片缓存所对应的渲染资源的资源状态;The obtaining module 62 is configured to obtain a rendering frame diagram corresponding to the virtual scene when rendering the virtual scene, wherein the rendering frame diagram records the rendering process information and rendering resource information corresponding to the virtual scene, and the rendering The process information is used to indicate the rendering stages divided into rendering the virtual scene and the rendering substages divided by each of the rendering stages, and the rendering resource information is used to indicate that each rendering substage is allowed to use the on-chip sub-stage of the graphics processor. The resource status of the rendering resource corresponding to the slice cache;
第一创建模块64,用于按照所述渲染框架图创建所述虚拟场景对应的目标渲染流程,其中,所述目标渲染流程中所使用的目标渲染资源满足所述渲染资源信息所指示的资源状态;The first creation module 64 is configured to create a target rendering process corresponding to the virtual scene according to the rendering frame diagram, wherein the target rendering resource used in the target rendering process satisfies the resource state indicated by the rendering resource information ;
渲染模块66,用于按照所述目标渲染流程渲染所述虚拟场景。The rendering module 66 is configured to render the virtual scene according to the target rendering process.
需要说明的是,该实施例中的获取模块62可以用于执行本申请实施例中的步骤S202,该实施例中的第一创建模块64可以用于执行本申 请实施例中的步骤S204,该实施例中的渲染模块66可以用于执行本申请实施例中的步骤S206。It should be noted that the acquiring module 62 in this embodiment may be used to execute step S202 in this embodiment of the present application, and the first creating module 64 in this embodiment may be used to execute step S204 in this embodiment of the present application, the The rendering module 66 in the embodiment may be configured to perform step S206 in the embodiment of the present application.
此处需要说明的是,上述模块与对应的步骤所实现的示例和应用场景相同,但不限于上述实施例所公开的内容。需要说明的是,上述模块作为装置的一部分可以运行在如图1所示的硬件环境中,可以通过软件实现,也可以通过硬件实现。It should be noted here that the examples and application scenarios implemented by the foregoing modules and corresponding steps are the same, but are not limited to the contents disclosed in the foregoing embodiments. It should be noted that, as a part of the device, the above modules may run in the hardware environment as shown in FIG. 1 , and may be implemented by software or hardware.
通过上述模块,渲染框架图中记录了使用图形处理器(GPU)片上分片缓存所需满足的资源状态以及划分的渲染阶段和子阶段,在渲染虚拟场景时根据该渲染框架图创建渲染流程进行场景渲染能够确保渲染过程发挥硬件的最优性能,达到了提高虚拟场景的渲染效率的技术效果,进而解决了虚拟场景的渲染效率较低的技术问题。Through the above modules, the rendering frame diagram records the resource status required to use the graphics processing unit (GPU) on-chip fragment cache and the divided rendering stages and sub-stages. When rendering the virtual scene, a rendering process is created according to the rendering frame diagram to perform the scene. The rendering can ensure the optimal performance of the hardware in the rendering process, achieve the technical effect of improving the rendering efficiency of the virtual scene, and then solve the technical problem of low rendering efficiency of the virtual scene.
作为一种可选的实施例,所述第一创建模块包括:As an optional embodiment, the first creation module includes:
第一创建单元,用于按照所述渲染资源信息为每个渲染子阶段创建满足所述资源状态的所述目标渲染资源;a first creation unit, configured to create the target rendering resource that satisfies the resource state for each rendering sub-stage according to the rendering resource information;
第二创建单元,用于按照所述渲染流程信息创建所述目标渲染资源之间的所述目标渲染流程。A second creating unit, configured to create the target rendering process between the target rendering resources according to the rendering process information.
作为一种可选的实施例,所述第一创建单元用于:As an optional embodiment, the first creation unit is used for:
构建满足所述渲染资源信息所指示的渲染目标尺寸和渲染目标格式的第一渲染目标;constructing a first rendering target that satisfies the rendering target size and rendering target format indicated by the rendering resource information;
将所述第一渲染目标的加载状态和存储状态配置为所述渲染资源信息所指示的目标加载状态和目标存储状态,得到第二渲染目标;Configuring the loading state and storage state of the first rendering target as the target loading state and the target storage state indicated by the rendering resource information, to obtain a second rendering target;
将所述第二渲染目标的图形处理器存储状态标记为所述渲染资源信息所指示的分片缓存状态,得到所述目标渲染资源。Marking the graphics processor storage state of the second rendering target as the fragment cache state indicated by the rendering resource information to obtain the target rendering resource.
作为一种可选的实施例,所述获取模块包括:As an optional embodiment, the obtaining module includes:
第一获取单元,用于获取所述虚拟场景的场景信息;a first obtaining unit, configured to obtain scene information of the virtual scene;
第二获取单元,用于从多个场景条件中获取所述场景信息所满足的目标场景条件,其中,所述多个场景条件与多个渲染框架图一一对应;a second obtaining unit, configured to obtain target scene conditions satisfied by the scene information from a plurality of scene conditions, wherein the plurality of scene conditions correspond to a plurality of rendering framework diagrams one-to-one;
确定单元,用于将所述目标场景条件所对应的渲染框架图确定为所述虚拟场景对应的渲染框架图。A determining unit, configured to determine the rendering frame diagram corresponding to the target scene condition as the rendering frame diagram corresponding to the virtual scene.
作为一种可选的实施例,所述装置还包括:As an optional embodiment, the device further includes:
划分模块,用于在获取所述虚拟场景对应的渲染框架图之前,将 所述虚拟场景的渲染流程划分为渲染阶段和渲染子阶段,得到所述渲染流程信息;A dividing module is used to divide the rendering process of the virtual scene into a rendering stage and a rendering sub-stage before obtaining the rendering frame diagram corresponding to the virtual scene, and obtain the rendering process information;
配置模块,用于配置每个渲染子阶段所包括的渲染目标和渲染目标信息,得到所述渲染资源信息,其中,所述渲染目标信息包括渲染目标尺寸,渲染目标格式,加载状态,存储状态和临时使用状态,所述临时使用状态用于指示允许所述每个渲染子阶段使用图形处理器的片上分片缓存;A configuration module, configured to configure the rendering target and rendering target information included in each rendering sub-stage, and obtain the rendering resource information, wherein the rendering target information includes the rendering target size, rendering target format, loading state, storage state and a temporary use state, the temporary use state is used to indicate that each rendering sub-stage is allowed to use the on-chip fragment cache of the graphics processor;
第二创建模块,用于使用所述渲染流程信息和所述渲染资源信息创建所述渲染框架图。A second creation module, configured to create the rendering frame diagram by using the rendering process information and the rendering resource information.
作为一种可选的实施例,所述配置模块包括:As an optional embodiment, the configuration module includes:
构建单元,用于构建每个渲染子阶段所包括的渲染目标;A building unit for building the rendering targets included in each rendering sub-stage;
第一配置单元,用于将所述渲染目标的渲染目标尺寸和渲染目标格式配置为允许使用所述图形处理器的片上分片缓存的渲染目标尺寸和渲染目标格式;a first configuration unit, configured to configure the rendering target size and rendering target format of the rendering target to allow the use of the rendering target size and rendering target format of the on-chip fragment cache of the graphics processor;
第二配置单元,用于将所述渲染目标的加载状态和存储状态配置为满足所述虚拟场景要求的加载状态和存储状态;a second configuration unit, configured to configure the loading state and storage state of the rendering target to meet the loading state and storage state required by the virtual scene;
第一标记单元,用于将所述渲染目标的图形处理器的片上存储状态标记为分片缓存。A first marking unit, configured to mark the on-chip storage state of the graphics processor of the rendering target as a slice cache.
作为一种可选的实施例,所述划分模块用于:As an optional embodiment, the dividing module is used for:
将所述虚拟场景的渲染流程中的几何渲染阶段配置为几何渲染子阶段,将光照渲染阶段配置为光照渲染子阶段;configuring the geometry rendering stage in the rendering process of the virtual scene as a geometry rendering sub-stage, and configuring the lighting rendering stage as a lighting rendering sub-stage;
将所述几何渲染子阶段和所述光照渲染子阶段合并为渲染阶段。The geometry rendering sub-stage and the lighting rendering sub-stage are combined into a rendering stage.
作为一种可选的实施例,所述配置模块包括:As an optional embodiment, the configuration module includes:
第三配置单元,用于配置所述几何渲染子阶段的渲染目标包括位置渲染目标,法线渲染目标,反射率渲染目标和深度渲染目标,所述光照渲染子阶段的渲染目标包括光照渲染目标;a third configuration unit, configured to configure the rendering targets of the geometry rendering sub-stage to include a position rendering target, a normal rendering target, a reflectance rendering target and a depth rendering target, and the rendering targets of the lighting rendering sub-stage include a lighting rendering target;
第四配置单元,用于将所述位置渲染目标,所述法线渲染目标,所述反射率渲染目标,所述深度渲染目标和所述光照渲染目标的渲染目标尺寸标记为预设尺寸,渲染目标格式标记为预设格式;The fourth configuration unit is used to mark the rendering target size of the position rendering target, the normal rendering target, the reflectivity rendering target, the depth rendering target and the lighting rendering target as a preset size, and render The target format is marked as a preset format;
第二标记单元,用于将所述位置渲染目标,法线渲染目标,反射率渲染目标和深度渲染目标的加载状态标记为清除上一次内容,存储状态标记为不关心之后内容,并将所述光照渲染目标的加载状态标记 为不关心之后内容,存储状态标记为存储内容;The second marking unit is used to mark the loading status of the position rendering target, the normal rendering target, the reflectivity rendering target and the depth rendering target as clearing the previous content, and marking the storage status as not caring about the later content, and marking the The loading state of the lighting rendering target is marked as don't care about the content after, and the storage state is marked as storage content;
第三标记单元,用于将所述位置渲染目标,所述法线渲染目标,所述反射率渲染目标,所述深度渲染目标和所述光照渲染目标的图形处理器的片上存储状态标记为分片缓存。a third marking unit, configured to mark the position rendering target, the normal rendering target, the reflectivity rendering target, the depth rendering target and the on-chip storage state of the lighting rendering target on-chip of the graphics processor as divided slice cache.
此处需要说明的是,上述模块与对应的步骤所实现的示例和应用场景相同,但不限于上述实施例所公开的内容。需要说明的是,上述模块作为装置的一部分可以运行在如图1所示的硬件环境中,可以通过软件实现,也可以通过硬件实现,其中,硬件环境包括网络环境。It should be noted here that the examples and application scenarios implemented by the foregoing modules and corresponding steps are the same, but are not limited to the contents disclosed in the foregoing embodiments. It should be noted that, as a part of the device, the above modules may run in the hardware environment as shown in FIG. 1 , and may be implemented by software or hardware, wherein the hardware environment includes a network environment.
根据本申请实施例的另一个方面,还提供了一种用于实施上述虚拟场景的渲染方法的电子装置。According to another aspect of the embodiments of the present application, an electronic device for implementing the above virtual scene rendering method is also provided.
图7是根据本申请实施例的一种电子装置的结构框图,如图7所示,该电子装置可以包括:一个或多个(图中仅示出一个)处理器701、存储器703、以及传输装置705,如图7所示,该电子装置还可以包括输入输出设备707。FIG. 7 is a structural block diagram of an electronic device according to an embodiment of the present application. As shown in FIG. 7 , the electronic device may include: one or more (only one is shown in the figure) a processor 701 , a memory 703 , and a transmission The device 705, as shown in FIG. 7, the electronic device may further include an input and output device 707.
其中,存储器703可用于存储软件程序以及模块,如本申请实施例中的虚拟场景的渲染方法和装置对应的程序指令/模块,处理器701通过运行存储在存储器703内的软件程序以及模块,从而执行各种功能应用以及数据处理,即实现上述的虚拟场景的渲染方法。存储器703可包括高速随机存储器,还可以包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器703可进一步包括相对于处理器701远程设置的存储器,这些远程存储器可以通过网络连接至电子装置。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 703 may be used to store software programs and modules, such as program instructions/modules corresponding to the virtual scene rendering method and device in the embodiments of the present application, and the processor 701 runs the software programs and modules stored in the memory 703 to thereby Execute various functional applications and data processing, that is, realize the above-mentioned rendering method of the virtual scene. Memory 703 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 703 may further include memory located remotely from the processor 701, and these remote memories may be connected to the electronic device through a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
上述的传输装置705用于经由一个网络接收或者发送数据,还可以用于处理器与存储器之间的数据传输。上述的网络具体实例可包括有线网络及无线网络。在一个实例中,传输装置705包括一个网络适配器(Network Interface Controller,NIC),其可通过网线与其他网络设备与路由器相连从而可与互联网或局域网进行通讯。在一个实例中,传输装置705为射频(Radio Frequency,RF)模块,其用于通过无线方式与互联网进行通讯。The above-mentioned transmission device 705 is used for receiving or sending data via a network, and may also be used for data transmission between the processor and the memory. Specific examples of the above-mentioned networks may include wired networks and wireless networks. In one example, the transmission device 705 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers through a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 705 is a radio frequency (Radio Frequency, RF) module, which is used for wirelessly communicating with the Internet.
其中,具体地,存储器703用于存储应用程序。Specifically, the memory 703 is used to store application programs.
处理器701可以通过传输装置705调用存储器703存储的应用程 序,以执行下述步骤:The processor 701 can call the application program stored in the memory 703 through the transmission device 705 to perform the following steps:
在渲染虚拟场景时,获取所述虚拟场景对应的渲染框架图,其中,所述渲染框架图中记录了所述虚拟场景对应的渲染流程信息和渲染资源信息,所述渲染流程信息用于指示渲染所述虚拟场景所划分的渲染阶段和每个所述渲染阶段所划分的渲染子阶段,所述渲染资源信息用于指示允许每个渲染子阶段使用图形处理器的片上分片缓存所对应的渲染资源的资源状态;When rendering a virtual scene, a rendering frame diagram corresponding to the virtual scene is obtained, wherein the rendering frame diagram records the rendering process information and rendering resource information corresponding to the virtual scene, and the rendering process information is used to indicate rendering The rendering stage divided by the virtual scene and the rendering substage divided by each rendering stage, the rendering resource information is used to indicate that each rendering substage is allowed to use the rendering corresponding to the on-chip fragment cache of the graphics processor the resource status of the resource;
按照所述渲染框架图创建所述虚拟场景对应的目标渲染流程,其中,所述目标渲染流程中所使用的目标渲染资源满足所述渲染资源信息所指示的资源状态;Create a target rendering process corresponding to the virtual scene according to the rendering frame diagram, wherein the target rendering resource used in the target rendering process satisfies the resource state indicated by the rendering resource information;
按照所述目标渲染流程渲染所述虚拟场景。The virtual scene is rendered according to the target rendering process.
采用本申请实施例,提供了一种虚拟场景的渲染的方案。渲染框架图中记录了使用图形处理器(GPU)片上分片缓存所需满足的资源状态以及划分的渲染阶段和子阶段,在渲染虚拟场景时根据该渲染框架图创建渲染流程进行场景渲染能够确保渲染过程发挥硬件的最优性能,达到了提高虚拟场景的渲染效率的技术效果,进而解决了虚拟场景的渲染效率较低的技术问题。With the embodiments of the present application, a solution for rendering a virtual scene is provided. The rendering frame diagram records the resource status required to use the graphics processing unit (GPU) on-chip fragment cache as well as the divided rendering stages and sub-stages. When rendering a virtual scene, creating a rendering process based on the rendering frame diagram for scene rendering can ensure rendering. The process utilizes the optimal performance of the hardware to achieve the technical effect of improving the rendering efficiency of the virtual scene, thereby solving the technical problem of low rendering efficiency of the virtual scene.
可选地,本实施例中的具体示例可以参考上述实施例中所描述的示例,本实施例在此不再赘述。Optionally, for specific examples in this embodiment, reference may be made to the examples described in the foregoing embodiments, and details are not described herein again in this embodiment.
本领域普通技术人员可以理解,图7所示的结构仅为示意,电子装置可以是智能手机(如Android手机、iOS手机等)、平板电脑、掌上电脑以及移动互联网设备(Mobile Internet Devices,MID)、PAD等设备。图7其并不对上述电子装置的结构造成限定。例如,电子装置还可包括比图7中所示更多或者更少的组件(如网络接口、显示装置等),或者具有与图7所示不同的配置。Those of ordinary skill in the art can understand that the structure shown in FIG. 7 is only a schematic diagram, and the electronic device can be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a handheld computer, and a mobile Internet Device (Mobile Internet Devices, MID) , PAD and other equipment. FIG. 7 does not limit the structure of the above electronic device. For example, the electronic device may also include more or fewer components than those shown in FIG. 7 (eg, network interface, display device, etc.), or have a different configuration than that shown in FIG. 7 .
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令电子装置相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:闪存盘、只读存储器(Read-Only Memory,ROM)、随机存取器(Random Access Memory,RAM)、磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing hardware related to the electronic device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium can Including: flash disk, read-only memory (Read-Only Memory, ROM), random access device (Random Access Memory, RAM), magnetic disk or optical disk, etc.
本申请的实施例还提供了一种存储介质。可选地,在本实施例中,上述存储介质可以用于执行虚拟场景的渲染方法的程序代码。Embodiments of the present application also provide a storage medium. Optionally, in this embodiment, the above-mentioned storage medium may be used to execute the program code of the rendering method of the virtual scene.
可选地,在本实施例中,上述存储介质可以位于上述实施例所示的网络中的多个网络设备中的至少一个网络设备上。Optionally, in this embodiment, the foregoing storage medium may be located on at least one network device among multiple network devices in the network shown in the foregoing embodiment.
可选地,在本实施例中,存储介质被设置为存储用于执行以下步骤的程序代码:Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps:
在渲染虚拟场景时,获取所述虚拟场景对应的渲染框架图,其中,所述渲染框架图中记录了所述虚拟场景对应的渲染流程信息和渲染资源信息,所述渲染流程信息用于指示渲染所述虚拟场景所划分的渲染阶段和每个所述渲染阶段所划分的渲染子阶段,所述渲染资源信息用于指示允许每个渲染子阶段使用图形处理器的片上分片缓存所对应的渲染资源的资源状态;When rendering a virtual scene, a rendering frame diagram corresponding to the virtual scene is obtained, wherein the rendering frame diagram records the rendering process information and rendering resource information corresponding to the virtual scene, and the rendering process information is used to indicate rendering The rendering stage divided by the virtual scene and the rendering substage divided by each rendering stage, the rendering resource information is used to indicate that each rendering substage is allowed to use the rendering corresponding to the on-chip fragment cache of the graphics processor the resource status of the resource;
按照所述渲染框架图创建所述虚拟场景对应的目标渲染流程,其中,所述目标渲染流程中所使用的目标渲染资源满足所述渲染资源信息所指示的资源状态;Create a target rendering process corresponding to the virtual scene according to the rendering frame diagram, wherein the target rendering resource used in the target rendering process satisfies the resource state indicated by the rendering resource information;
按照所述目标渲染流程渲染所述虚拟场景。The virtual scene is rendered according to the target rendering process.
可选地,本实施例中的具体示例可以参考上述实施例中所描述的示例,本实施例在此不再赘述。Optionally, for specific examples in this embodiment, reference may be made to the examples described in the foregoing embodiments, and details are not described herein again in this embodiment.
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic Various media that can store program codes, such as discs or optical discs.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The above-mentioned serial numbers of the embodiments of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments.
上述实施例中的集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在上述计算机可读取的存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在存储介质中,包括若干指令用以使得一台或多台计算机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。If the integrated units in the above-mentioned embodiments are implemented in the form of software functional units and sold or used as independent products, they may be stored in the above-mentioned computer-readable storage medium. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art, or all or part of the technical solution, and the computer software product is stored in a storage medium, Several instructions are included to cause one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
在本申请的上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above-mentioned embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
在本申请所提供的几个实施例中,应该理解到,所揭露的客户端,可通过其它的方式实现。其中,以上所描述的装置实施例仅仅是示意 性的,例如所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,单元或模块的间接耦合或通信连接,可以是电性或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed client may be implemented in other manners. The apparatus embodiments described above are only illustrative, for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components may be combined or Integration into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of units or modules, and may be in electrical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
以上所述仅是本申请的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本申请的保护范围。The above are only the preferred embodiments of the present application. It should be pointed out that for those skilled in the art, without departing from the principles of the present application, several improvements and modifications can also be made. It should be regarded as the protection scope of this application.
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的虚拟场景的渲染装置中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置的程序/指令(例如,计算机程序/指令和计算机程序产品)。这样的实现本发明的程序/指令可以存储在计算机可读介质上,或者可以一个或者多个信号的形式存在,这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。Various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all functions of some or all components of the virtual scene rendering apparatus according to the embodiment of the present invention. The present invention can also be implemented as a program/instruction (eg, computer program/instruction and computer program product) for an apparatus or apparatus for performing some or all of the methods described herein. Such programs/instructions implementing the present invention may be stored on a computer readable medium, or may exist in the form of one or more signals, such signals may be downloaded from an Internet website, or provided on a carrier signal, or in any form Available in other formats.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存 储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带、磁盘存储、量子存储器、基于石墨烯的存储介质或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。Computer-readable media includes both persistent and non-permanent, removable and non-removable media, and storage of information may be implemented by any method or technology. Information may be computer readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Flash Memory or other memory technology, Compact Disc Read Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, Magnetic tape cartridges, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices.
图8示意性地示出了可以实现根据本发明的一种虚拟场景的渲染方法的计算机装置/设备/系统,该计算机装置/设备/系统包括处理器810和以存储器820形式的计算机可读介质。存储器820是计算机可读介质的一个示例,其具有用于存储计算机程序/指令831的存储空间830。当所述计算机程序/指令831由处理器810执行时,可实现上文所描述的一种虚拟场景的渲染方法中的各个步骤。FIG. 8 schematically shows a computer apparatus/equipment/system that can implement a method for rendering a virtual scene according to the present invention, the computer apparatus/equipment/system including a processor 810 and a computer-readable medium in the form of a memory 820 . Memory 820 is an example of a computer readable medium having storage space 830 for storing computer programs/instructions 831 . When the computer program/instruction 831 is executed by the processor 810, each step in the method for rendering a virtual scene described above can be implemented.
图9示意性地示出了实现根据本发明的方法的计算机程序产品的框图。所述计算机程序产品包括计算机程序/指令910,当所述计算机程序/指令910被诸如图8所示的处理器810之类的处理器执行时,可实现上文所描述的一种虚拟场景的渲染方法中的各个步骤。Figure 9 schematically shows a block diagram of a computer program product implementing the method according to the invention. The computer program product includes a computer program/instructions 910 that, when executed by a processor, such as the processor 810 shown in FIG. 8, can implement a virtual scene described above. The various steps in the rendering method.
上文对本说明书特定实施例进行了描述,其与其它实施例一并涵盖于所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定遵循示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可行的或者有利的。Specific embodiments of this specification have been described above, and other embodiments are intended to be included within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that in the embodiments and still achieve desirable results. Additionally, the processes depicted in the figures do not necessarily follow the specific order shown, or sequential order, to achieve desirable results. In certain embodiments, multitasking and parallel processing are also possible or advantageous.
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。It should also be noted that the terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or device comprising a series of elements includes not only those elements, but also Other elements not expressly listed, or which are inherent to such a process, method, article of manufacture, or apparatus are also included. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, article of manufacture, or device that includes the element.
应可理解,以上所述实施例仅为举例说明本发明之目的而并非对本发明进行限制。在不脱离本发明基本精神及特性的前提下,本领域技术人员还可以通过其他方式来实施本发明。本发明的范围当以后附 的权利要求为准,凡在本说明书一个或多个实施例的精神和原则之内所做的任何修改、等同替换、改进等,皆应涵盖其中。It should be understood that the above-mentioned embodiments are only for the purpose of illustrating the present invention and not for limiting the present invention. Those skilled in the art can also implement the present invention in other ways without departing from the basic spirit and characteristics of the present invention. The scope of the present invention should be determined by the appended claims, and any modifications, equivalent replacements, improvements, etc., made within the spirit and principles of one or more embodiments of this specification should be covered therein.

Claims (13)

  1. 一种虚拟场景的渲染方法,其特征在于,包括:A method for rendering a virtual scene, comprising:
    在渲染虚拟场景时,获取所述虚拟场景对应的渲染框架图,其中,所述渲染框架图中记录了所述虚拟场景对应的渲染流程信息和渲染资源信息,所述渲染流程信息用于指示渲染所述虚拟场景所划分的渲染阶段和每个所述渲染阶段所划分的渲染子阶段,所述渲染资源信息用于指示允许每个渲染子阶段使用图形处理器的片上分片缓存所对应的渲染资源的资源状态;When rendering a virtual scene, a rendering frame diagram corresponding to the virtual scene is obtained, wherein the rendering frame diagram records the rendering process information and rendering resource information corresponding to the virtual scene, and the rendering process information is used to indicate rendering The rendering stage divided by the virtual scene and the rendering substage divided by each rendering stage, the rendering resource information is used to indicate that each rendering substage is allowed to use the rendering corresponding to the on-chip fragment cache of the graphics processor the resource status of the resource;
    按照所述渲染框架图创建所述虚拟场景对应的目标渲染流程,其中,所述目标渲染流程中所使用的目标渲染资源满足所述渲染资源信息所指示的资源状态;Create a target rendering process corresponding to the virtual scene according to the rendering frame diagram, wherein the target rendering resource used in the target rendering process satisfies the resource state indicated by the rendering resource information;
    按照所述目标渲染流程渲染所述虚拟场景。The virtual scene is rendered according to the target rendering process.
  2. 根据权利要求1所述的方法,其特征在于,按照所述渲染框架图创建所述虚拟场景对应的目标渲染流程包括:The method according to claim 1, wherein creating a target rendering process corresponding to the virtual scene according to the rendering frame diagram comprises:
    按照所述渲染资源信息为每个渲染子阶段创建满足所述资源状态的所述目标渲染资源;Create the target rendering resource that satisfies the resource state for each rendering sub-stage according to the rendering resource information;
    按照所述渲染流程信息创建所述目标渲染资源之间的所述目标渲染流程。The target rendering process between the target rendering resources is created according to the rendering process information.
  3. 根据权利要求2所述的方法,其特征在于,按照所述渲染资源信息为每个渲染子阶段创建满足所述资源状态的所述目标渲染资源包括:The method according to claim 2, wherein creating the target rendering resource that satisfies the resource state for each rendering sub-stage according to the rendering resource information comprises:
    构建满足所述渲染资源信息所指示的渲染目标尺寸和渲染目标格式的第一渲染目标;constructing a first rendering target that satisfies the rendering target size and rendering target format indicated by the rendering resource information;
    将所述第一渲染目标的加载状态和存储状态配置为所述渲染资源信息所指示的目标加载状态和目标存储状态,得到第二渲染目标;Configuring the loading state and storage state of the first rendering target as the target loading state and the target storage state indicated by the rendering resource information, to obtain a second rendering target;
    将所述第二渲染目标的图形处理器存储状态标记为所述渲染资源信息所指示的分片缓存状态,得到所述目标渲染资源。Marking the graphics processor storage state of the second rendering target as the fragment cache state indicated by the rendering resource information to obtain the target rendering resource.
  4. 根据权利要求1所述的方法,其特征在于,获取所述虚拟场景对应的渲染框架图包括:The method according to claim 1, wherein obtaining the rendering frame diagram corresponding to the virtual scene comprises:
    获取所述虚拟场景的场景信息;obtaining scene information of the virtual scene;
    从多个场景条件中获取所述场景信息所满足的目标场景条件,其 中,所述多个场景条件与多个渲染框架图一一对应;Obtain the target scene conditions satisfied by the scene information from multiple scene conditions, wherein the multiple scene conditions are in one-to-one correspondence with multiple rendering framework diagrams;
    将所述目标场景条件所对应的渲染框架图确定为所述虚拟场景对应的渲染框架图。The rendering frame diagram corresponding to the target scene condition is determined as the rendering frame diagram corresponding to the virtual scene.
  5. 根据权利要求1所述的方法,其特征在于,在获取所述虚拟场景对应的渲染框架图之前,所述方法还包括:The method according to claim 1, wherein before acquiring the rendering frame diagram corresponding to the virtual scene, the method further comprises:
    将所述虚拟场景的渲染流程划分为渲染阶段和渲染子阶段,得到所述渲染流程信息;Dividing the rendering process of the virtual scene into a rendering stage and a rendering sub-stage to obtain the rendering process information;
    配置每个渲染子阶段所包括的渲染目标和渲染目标信息,得到所述渲染资源信息,其中,所述渲染目标信息包括渲染目标尺寸,渲染目标格式,加载状态,存储状态和临时使用状态,所述临时使用状态用于指示允许所述每个渲染子阶段使用图形处理器的片上分片缓存;Configure the rendering target and rendering target information included in each rendering sub-stage, and obtain the rendering resource information, wherein the rendering target information includes the rendering target size, rendering target format, loading state, storage state and temporary use state. The temporary use state is used to indicate that each rendering sub-stage is allowed to use the on-chip fragment cache of the graphics processor;
    使用所述渲染流程信息和所述渲染资源信息创建所述渲染框架图。The rendering frame diagram is created using the rendering process information and the rendering resource information.
  6. 根据权利要求5所述的方法,其特征在于,配置每个渲染子阶段所包括的渲染目标和渲染目标信息包括:The method according to claim 5, wherein configuring the rendering target and rendering target information included in each rendering sub-stage comprises:
    构建每个渲染子阶段所包括的渲染目标;Build the render targets included in each rendering substage;
    将所述渲染目标的渲染目标尺寸和渲染目标格式配置为允许使用所述图形处理器的片上分片缓存的渲染目标尺寸和渲染目标格式;configuring a render target size and a render target format of the render target to allow the use of a render target size and a render target format of the graphics processor's on-chip fragment cache;
    将所述渲染目标的加载状态和存储状态配置为满足所述虚拟场景要求的加载状态和存储状态;configuring the loading state and storage state of the rendering target to meet the loading state and storage state required by the virtual scene;
    将所述渲染目标的图形处理器的片上存储状态标记为分片缓存。The on-chip storage state of the graphics processor of the rendering target is marked as a slice cache.
  7. 根据权利要求5所述的方法,其特征在于,将所述虚拟场景的渲染流程划分为渲染阶段和渲染子阶段包括:The method according to claim 5, wherein dividing the rendering process of the virtual scene into a rendering stage and a rendering sub-stage comprises:
    将所述虚拟场景的渲染流程中的几何渲染阶段配置为几何渲染子阶段,将光照渲染阶段配置为光照渲染子阶段;configuring the geometry rendering stage in the rendering process of the virtual scene as a geometry rendering sub-stage, and configuring the lighting rendering stage as a lighting rendering sub-stage;
    将所述几何渲染子阶段和所述光照渲染子阶段合并为渲染阶段。The geometry rendering sub-stage and the lighting rendering sub-stage are combined into a rendering stage.
  8. 根据权利要求7所述的方法,其特征在于,配置每个渲染子阶段所包括的渲染目标和渲染目标信息包括:The method according to claim 7, wherein configuring the rendering target and rendering target information included in each rendering sub-stage comprises:
    配置所述几何渲染子阶段的渲染目标包括位置渲染目标,法线渲染目标,反射率渲染目标和深度渲染目标,所述光照渲染子阶段的渲染目标包括光照渲染目标;The rendering targets configured in the geometry rendering sub-stage include position rendering targets, normal rendering targets, reflectivity rendering targets and depth rendering targets, and the rendering targets in the lighting rendering sub-stage include lighting rendering targets;
    将所述位置渲染目标,所述法线渲染目标,所述反射率渲染目标,所述深度渲染目标和所述光照渲染目标的渲染目标尺寸标记为预设尺 寸,渲染目标格式标记为预设格式;Mark the rendering target size of the position rendering target, the normal rendering target, the reflectivity rendering target, the depth rendering target and the lighting rendering target as the preset size, and mark the rendering target format as the preset format ;
    将所述位置渲染目标,法线渲染目标,反射率渲染目标和深度渲染目标的加载状态标记为清除上一次内容,存储状态标记为不关心之后内容,并将所述光照渲染目标的加载状态标记为不关心之后内容,存储状态标记为存储内容;Mark the loading status of the position rendering target, the normal rendering target, the reflectance rendering target and the depth rendering target as clearing the last content, mark the storage status as do not care about the next content, and mark the loading status of the lighting rendering target In order not to care about the later content, the storage status is marked as storage content;
    将所述位置渲染目标,所述法线渲染目标,所述反射率渲染目标,所述深度渲染目标和所述光照渲染目标的图形处理器的片上存储状态标记为分片缓存。Mark the on-chip storage states of the position rendering target, the normal rendering target, the albedo rendering target, the depth rendering target and the graphics processor of the lighting rendering target as a slice cache.
  9. 一种虚拟场景的渲染装置,其特征在于,包括:A device for rendering a virtual scene, comprising:
    获取模块,用于在渲染虚拟场景时,获取所述虚拟场景对应的渲染框架图,其中,所述渲染框架图中记录了所述虚拟场景对应的渲染流程信息和渲染资源信息,所述渲染流程信息用于指示渲染所述虚拟场景所划分的渲染阶段和每个所述渲染阶段所划分的渲染子阶段,所述渲染资源信息用于指示允许每个渲染子阶段使用图形处理器的片上分片缓存所对应的渲染资源的资源状态;an acquisition module, configured to acquire a rendering frame diagram corresponding to the virtual scene when rendering the virtual scene, wherein the rendering frame diagram records the rendering process information and rendering resource information corresponding to the virtual scene, and the rendering process The information is used to indicate the rendering stage divided for rendering the virtual scene and the rendering substage divided by each of the rendering stages, and the rendering resource information is used to indicate that each rendering substage is allowed to use the on-chip slice of the graphics processor The resource status of the rendering resource corresponding to the cache;
    第一创建模块,用于按照所述渲染框架图创建所述虚拟场景对应的目标渲染流程,其中,所述目标渲染流程中所使用的目标渲染资源满足所述渲染资源信息所指示的资源状态;a first creation module, configured to create a target rendering process corresponding to the virtual scene according to the rendering frame diagram, wherein the target rendering resource used in the target rendering process satisfies the resource state indicated by the rendering resource information;
    渲染模块,用于按照所述目标渲染流程渲染所述虚拟场景。A rendering module, configured to render the virtual scene according to the target rendering process.
  10. 一种电子装置,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,其特征在于,所述处理器通过所述计算机程序执行上述权利要求1至8任一项中所述的方法。An electronic device comprising a memory, a processor and a computer program stored on the memory and running on the processor, characterized in that the processor executes the above claims 1 to 8 through the computer program The method described in any one.
  11. 一种计算机装置/设备/系统,包括存储器、处理器及存储在存储器上的计算机程序/指令,所述处理器执行所述计算机程序/指令时实现根据权利要求1-8中任一项所述的方法的步骤。A computer device/device/system, comprising a memory, a processor, and a computer program/instruction stored on the memory, the processor implementing the computer program/instruction according to any one of claims 1-8 when the processor executes the computer program/instruction steps of the method.
  12. 一种计算机可读介质,其上存储有计算机程序/指令,所述计算机程序/指令被处理器执行时实现根据权利要求1-8中任一项所述的方法的步骤。A computer-readable medium having stored thereon computer programs/instructions which, when executed by a processor, implement the steps of the method according to any one of claims 1-8.
  13. 一种计算机程序产品,包括计算机程序/指令,所述计算机程序/指令被处理器执行时实现根据权利要求1-8中任一项所述的方法的步骤。A computer program product comprising computer programs/instructions which, when executed by a processor, implement the steps of the method according to any one of claims 1-8.
PCT/CN2021/121484 2020-12-18 2021-09-28 Method and apparatus for rendering virtual scene WO2022127278A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011501111.2A CN112233217B (en) 2020-12-18 2020-12-18 Rendering method and device of virtual scene
CN202011501111.2 2020-12-18

Publications (1)

Publication Number Publication Date
WO2022127278A1 true WO2022127278A1 (en) 2022-06-23

Family

ID=74124908

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/121484 WO2022127278A1 (en) 2020-12-18 2021-09-28 Method and apparatus for rendering virtual scene

Country Status (2)

Country Link
CN (1) CN112233217B (en)
WO (1) WO2022127278A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115063565A (en) * 2022-08-08 2022-09-16 荣耀终端有限公司 Wearable article try-on method and device and electronic equipment
CN116832434A (en) * 2023-06-19 2023-10-03 广州怪力视效网络科技有限公司 Method and device for rendering virtual sky in game scene
CN116863058A (en) * 2023-09-05 2023-10-10 湖南马栏山视频先进技术研究院有限公司 Video data processing system based on GPU
CN117611472A (en) * 2024-01-24 2024-02-27 四川物通科技有限公司 Fusion method for metaspace and cloud rendering

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112233217B (en) * 2020-12-18 2021-04-02 完美世界(北京)软件科技发展有限公司 Rendering method and device of virtual scene
CN113032095A (en) * 2021-03-15 2021-06-25 深圳市瑞驰信息技术有限公司 System and method for realizing android container operation on ARM architecture
CN114549723A (en) * 2021-03-30 2022-05-27 完美世界(北京)软件科技发展有限公司 Rendering method, device and equipment for illumination information in game scene
CN113313802B (en) * 2021-05-25 2022-03-11 完美世界(北京)软件科技发展有限公司 Image rendering method, device and equipment and storage medium
CN113318444B (en) * 2021-06-08 2023-01-10 天津亚克互动科技有限公司 Role rendering method and device, electronic equipment and storage medium
CN113485698B (en) * 2021-06-23 2022-04-19 北京奇岱松科技有限公司 Rendering code conversion generation method and device, computing equipment and storage medium
CN113470092B (en) * 2021-06-30 2022-05-10 完美世界(北京)软件科技发展有限公司 Terrain rendering method and device, electronic equipment and storage medium
CN117292034A (en) * 2022-06-17 2023-12-26 腾讯科技(上海)有限公司 Virtual scene rendering method, device, equipment and storage medium
CN115439586B (en) * 2022-10-27 2023-03-24 腾讯科技(深圳)有限公司 Data processing method, device, storage medium and computer program product

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104392479A (en) * 2014-10-24 2015-03-04 无锡梵天信息技术股份有限公司 Method of carrying out illumination coloring on pixel by using light index number
CN108932742A (en) * 2018-07-10 2018-12-04 北京航空航天大学 A kind of extensive infrared terrain scene real-time rendering method based on remote sensing image classification
WO2019029252A1 (en) * 2017-08-10 2019-02-14 腾讯科技(深圳)有限公司 Map data processing method, computer device and storage medium
CN110599574A (en) * 2019-09-17 2019-12-20 网易(杭州)网络有限公司 Rendering method and device of game scene and electronic equipment
CN112016019A (en) * 2020-08-25 2020-12-01 北京优锘科技有限公司 Scene rendering debugging method and device
CN112233217A (en) * 2020-12-18 2021-01-15 完美世界(北京)软件科技发展有限公司 Rendering method and device of virtual scene

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8638337B2 (en) * 2009-03-16 2014-01-28 Microsoft Corporation Image frame buffer management
CN102157008B (en) * 2011-04-12 2014-08-06 电子科技大学 Large-scale virtual crowd real-time rendering method
CN102651142B (en) * 2012-04-16 2016-03-16 深圳超多维光电子有限公司 Image rendering method and device
US20200211259A1 (en) * 2018-12-28 2020-07-02 Intel Corporation Apparatus and method for acceleration data structure refit
US11036545B2 (en) * 2019-03-15 2021-06-15 Intel Corporation Graphics systems and methods for accelerating synchronization using fine grain dependency check and scheduling optimizations based on available shared memory space
CN110784775A (en) * 2019-11-25 2020-02-11 金明晔 Video fragment caching method and device and video-on-demand system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104392479A (en) * 2014-10-24 2015-03-04 无锡梵天信息技术股份有限公司 Method of carrying out illumination coloring on pixel by using light index number
WO2019029252A1 (en) * 2017-08-10 2019-02-14 腾讯科技(深圳)有限公司 Map data processing method, computer device and storage medium
CN108932742A (en) * 2018-07-10 2018-12-04 北京航空航天大学 A kind of extensive infrared terrain scene real-time rendering method based on remote sensing image classification
CN110599574A (en) * 2019-09-17 2019-12-20 网易(杭州)网络有限公司 Rendering method and device of game scene and electronic equipment
CN112016019A (en) * 2020-08-25 2020-12-01 北京优锘科技有限公司 Scene rendering debugging method and device
CN112233217A (en) * 2020-12-18 2021-01-15 完美世界(北京)软件科技发展有限公司 Rendering method and device of virtual scene

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115063565A (en) * 2022-08-08 2022-09-16 荣耀终端有限公司 Wearable article try-on method and device and electronic equipment
CN115063565B (en) * 2022-08-08 2023-01-24 荣耀终端有限公司 Wearable article try-on method and device and electronic equipment
CN116832434A (en) * 2023-06-19 2023-10-03 广州怪力视效网络科技有限公司 Method and device for rendering virtual sky in game scene
CN116832434B (en) * 2023-06-19 2024-04-12 广州怪力视效网络科技有限公司 Method and device for rendering virtual sky in game scene
CN116863058A (en) * 2023-09-05 2023-10-10 湖南马栏山视频先进技术研究院有限公司 Video data processing system based on GPU
CN116863058B (en) * 2023-09-05 2023-11-14 湖南马栏山视频先进技术研究院有限公司 Video data processing system based on GPU
CN117611472A (en) * 2024-01-24 2024-02-27 四川物通科技有限公司 Fusion method for metaspace and cloud rendering
CN117611472B (en) * 2024-01-24 2024-04-09 四川物通科技有限公司 Fusion method for metaspace and cloud rendering

Also Published As

Publication number Publication date
CN112233217A (en) 2021-01-15
CN112233217B (en) 2021-04-02

Similar Documents

Publication Publication Date Title
WO2022127278A1 (en) Method and apparatus for rendering virtual scene
JP6062438B2 (en) System and method for layering using a tile-by-tile renderer
JP7386990B2 (en) Video playback methods, devices, equipment and computer programs
US20100060652A1 (en) Graphics rendering system
US10699361B2 (en) Method and apparatus for enhanced processing of three dimensional (3D) graphics data
JP6882992B2 (en) How and devices to preview moving images, and how and devices to display representation packages
JP5668078B2 (en) Server side rendering
WO2018058811A1 (en) Virtual reality scene loading method and device
US9396564B2 (en) Atlas generation based on client video configuration
JP2015509776A (en) online game
CN104508638A (en) Cache data migration in a multicore processing system
CN114025238B (en) Native android application cloud virtualization method based on Linux server
CN112307403A (en) Page rendering method, device, storage medium and terminal
CN112288841B (en) Method and device for creating rendering frame graph
US8738742B2 (en) Tiered XML services in a content management system
CN114154000A (en) Multimedia resource publishing method and device
CN110267077A (en) Offline cache method, apparatus, terminal and readable storage medium storing program for executing
CN111355978A (en) Video file processing method and device, mobile terminal and storage medium
CN111008934B (en) Scene construction method, device, equipment and storage medium
WO2018049682A1 (en) Virtual 3d scene production method and related device
CN114866801B (en) Video data processing method, device, equipment and computer readable storage medium
US20230164210A1 (en) Asynchronous workflow and task api for cloud based processing
US20230141129A1 (en) Flexible slice, tile and brick partitioning
US8203567B2 (en) Graphics processing method and apparatus implementing window system
CN104581403A (en) Method and device for sharing video content

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21905208

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21905208

Country of ref document: EP

Kind code of ref document: A1