A method and device for realizing real-time global illumination on a mobile terminal
By adapting and integrating lighting technology in Unreal Engine on the mobile terminal, and rendering and lighting calculations on the chunked buffer, the problem of real-time global lighting on the mobile platform is solved, and high-performance and low-power consumption are achieved Dynamic global lighting effects.
Patent Information
- Application Number
- CN202410250477.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-05
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-03-05
AI Technical Summary
The existing technology is difficult to achieve real-time global lighting on mobile platforms, mainly due to the high computing power requirements and the limitations of GPU hardware characteristics, which can only be applied on high computing power devices.
By adapting and integrating to the mobile platform on the mobile terminal, the shadow map of the picture is rendered on the chunked buffer, the geometric buffer of the Lumen scene is generated, and the direct lighting is calculated, and the process is obtained from the voxel lighting in the previous frame The accumulated results of multi-frame ray ejection form the final illumination, and ultimately the direct illumination and indirect illumination are added to form the global illumination result.
It realizes dynamic global lighting with high performance and low power consumption on the mobile terminal, makes full use of the hardware structure of the mobile platform, and improves the global lighting efficiency of the mobile terminal.
Smart Images

Figure CN118365773B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method and device for implementing real-time global illumination on a mobile terminal. Background Art
[0002] In the existing technology, real-time global illumination technology has always been an essential advanced feature for high-quality console games. Since global illumination technology has high computing power requirements and requires GPU hardware feature support, it can currently only be applied to high-computing power devices, such as PC, PlayStation and other console platforms.
[0003] When light leaves a light source, it illuminates all surfaces that can be seen from the light source's position, which is called "direct lighting" in computer graphics. But in real life, light doesn't stop there, it also bounces off surfaces, capturing the surface's color in the process. The bounce of light off rough surfaces in all directions is called "global illumination." The bounce of light off smooth surfaces is called "reflection." Eventually, the light reaches your eye or camera and forms an image. In most games, global illumination is only handled through an offline process called "lightmap baking" because it is too computationally expensive to calculate in real time. In Unreal Engine, lightmaps are baked via the CPU. Static lighting provided by lightmaps can result in very high quality, but requires long build times and greatly limits the game environment. Any action that significantly changes the indirect lighting will make the lighting state incorrect.
[0004] With the iteration and upgrade of mobile devices in recent years, the performance of mobile GPU (graphics processing unit) has gradually approached that of early host device GPU. In order to apply real-time global illumination technology, an advanced graphics feature, to mobile platforms, we have adapted and integrated the lighting technology that has been implemented on host devices in Unreal Engine for mobile platforms, and made innovative improvements to enable high-performance applications on mobile terminals. Summary of the invention
[0005] The present invention provides a method and device for realizing real-time global illumination on a mobile terminal, so as to solve the problem of fully utilizing the hardware structure of a mobile platform and realizing dynamic global illumination with high performance and low power consumption.
[0006] According to one aspect of the present invention, a method for implementing real-time global illumination on a mobile terminal is provided, comprising the following steps:
[0007] Render the shadow map of the image;
[0008] On the block buffer, generate the geometry buffer of the Lumen scene according to the shadow map, and calculate the direct lighting in the surface buffer;
[0009] Obtain the cumulative result of light bounces from multiple frames from the voxel lighting of the previous frame to form the final lighting as the indirect lighting of the current frame;
[0010] The diffuse indirect lighting calculated in the entire Lumen process and the indirect lighting of the rough mirror calculated in the reflection step are directly added to the direct lighting results calculated in the rendering process to form the global illumination result.
[0011] The shadow map of the rendered image includes:
[0012] Calculate shadows through ray tracing; first render the depth of the entire scene, then compare the depth to determine whether the current rendered pixel is blocked, and get a shadow map.
[0013] The method further comprises:
[0014] The shadow image is subjected to noise reduction processing, specifically comprising:
[0015] The data format is re-encoded using a spatial-temporal difference guided filtering algorithm, and four light sources are denoised simultaneously in one denoising calculation;
[0016] Divide the four textures used to transfer data into two groups, and create RGBA32UINT and RGBA8 data formats in each group;
[0017] Each single channel in each texture stores information used for denoising calculation on a light source, storing blur radius, transmission distance, ray miss count and sampling count respectively, and this information is sampled in the denoising calculation.
[0018] The method further comprises:
[0019] The four intermediate texture formats are used to transfer data back and forth between multiple calculation steps, and the output data corresponding to each step is the input data of the next step. The noise reduction result is obtained by alternating back and forth between the four intermediate texture formats.
[0020] The method generates a geometry buffer of the Lumen scene based on the shadow map on the block buffer and calculates direct lighting in the surface buffer, including:
[0021] The geometry buffer G-Buffer is first rendered through the basic rendering path on the block chip buffer to draw all the basic geometric information related to the scene on the current screen for sampling information for subsequent rendering processes.
[0022] The method further comprises:
[0023] In the basic rendering pass, selected necessary data is copied from the tile chip buffer to the system buffer; the data includes: intrinsic color, normal, metalness, roughness, reflectivity and depth information.
[0024] The method further comprises:
[0025] From the basic rendering stage to the lighting stage, everything is done on the entire tile chip buffer, and the entire rendering process occurs within one rendering pass;
[0026] The final combination and reflection steps are calculated after the tile chip buffer, after the entire direct lighting;
[0027] Finally, the direct lighting and indirect lighting obtained by shading rendering are combined together as the rendering result of global illumination.
[0028] According to another aspect of the present invention, a mobile terminal real-time global illumination implementation device is provided, comprising:
[0029] Shadow rendering unit, used to render the shadow map of the image;
[0030] The direct lighting calculation unit is used to generate the geometry buffer of the Lumen scene based on the shadow map on the block buffer and calculate the direct lighting in the surface buffer;
[0031] The indirect lighting calculation unit is used to obtain the cumulative result of light bounces from multiple frames from the voxel lighting of the previous frame to form the final lighting as the indirect lighting of the current frame;
[0032] The global illumination acquisition unit is used to directly add the diffuse indirect illumination calculated in the entire Lumen process and the rough mirror indirect illumination calculated in the reflection step to the direct illumination result calculated in the rendering process to form the global illumination result.
[0033] The device also includes:
[0034] A denoising unit is used to perform denoising on the shadow map, re-encode the data format using a spatiotemporal difference guided filtering algorithm, and simultaneously perform denoising on four light sources in one denoising calculation; four textures used to transfer data are divided into two groups, and each group creates RGBA32UINT and RGBA8 data formats; each single channel in each texture stores information on a light source used for denoising calculation, and stores blur radius, transmission distance, ray miss count and sampling count respectively, and samples this information in the denoising calculation; the four intermediate texture formats are used to transfer data back and forth between multiple calculation steps, the output data corresponding to each step is the input data of the next step, and the denoising result is obtained by alternating back and forth between the four intermediate texture formats.
[0035] The device also includes:
[0036] The tile chip buffer is used to complete the entire rendering process from the basic rendering stage to the lighting stage within a rendering pass;
[0037] The direct lighting calculation unit is used to render the geometric buffer G-Buffer through the basic rendering path on the block chip buffer, draw all the basic geometric information related to the scene in the current screen, and use it to sample information for subsequent rendering processes; in the basic rendering path, the selected necessary data is copied from the block chip buffer to the system cache area; the data includes: intrinsic color, normal, metalness, roughness, reflectivity and depth information.
[0038] By adopting the technical solution of the present invention, a mobile terminal real-time global illumination implementation solution is proposed. On the block buffer, the geometric buffer G-buffer of the Lumen scene LumenScene is generated according to the shadow map, and the direct illumination is calculated in the surface buffer SurfaceCache. The cumulative result of the light bounce Bounce of multiple frames is obtained from the voxel lighting Voxel Lighting of the previous frame to form the final lighting Final Lighting as the indirect lighting of the current frame. The diffuse indirect lighting calculated in the entire Lumen process and the indirect lighting of the rough mirror calculated in the reflection step are directly added to the direct lighting result calculated in the rendering process to form the global illumination result.
[0039] The solution of the present invention makes full use of the block chip buffer for rendering, changes the synthesis order of Lumen indirect lighting, and allows the preceding rendering process to occur in the block chip buffer as much as possible to obtain higher performance, thereby realizing an efficient global lighting solution on the mobile terminal.
[0040] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0042] Figure 1 This is a flow chart showing the principle of a method for implementing real-time global illumination on a mobile terminal in an embodiment of the present invention;
[0043] Figure 2 A schematic diagram of an image rendering pipeline in a mobile terminal real-time global illumination implementation solution in an embodiment of the present invention;
[0044] Figure 3A schematic diagram of a data flow of a rendering pipeline in an embodiment of the present invention;
[0045] Figure 4 Schematic diagram of the data encoding format of the noise reduction algorithm in an embodiment of the present invention.
[0046] Figure 5 Schematic diagram of data processing of noise reduction algorithm in an embodiment of the present invention.
[0047] Figure 6 Schematic diagram of the shadow shading rendering process in an embodiment of the present invention. DETAILED DESCRIPTION
[0048] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0049] Global Illumination (GI) refers to a rendering technology that takes into account both the direct lighting from the light source in the scene and the indirect lighting reflected by other objects in the scene.
[0050] Lumen is a real-time global illumination and reflection system that provides fully dynamic indirect lighting and reflections for your scene. The Lumen system significantly improves global illumination because it more accurately simulates the interaction of light with objects, as well as the transfer of light and reflections between objects.
[0051] Tiled memory is a high-speed cache located on the integrated chip close to the GPU core. Since it is very close to the GPU core, its access efficiency is very high and its power consumption is very low. Therefore, high-performance rendering on mobile devices requires full use of Tiled memory. Since Tiled memory is expensive, the cache space is designed to be very small, only enough to accommodate the size of a tile, about 32x32 screen pixels. Therefore, the working principle of the GPU of a mobile device is to divide the entire screen into several tiles, and then render each tile one by one. It is for this reason that Tiled memory cannot be used as a complete texture and randomly sampled.
[0052] The tile chip buffer is a high-speed cache located on the chip of the mobile device. Memory access in the tile chip buffer is very efficient. However, the tile chip buffer also has its own limitations, and it is impossible to randomly sample the texture cache on it. In order to make full use of the hardware characteristics of the tile chip buffer of the mobile platform, the present application solves the problem of random sampling of textures, and executes the entire rendering process on the tile chip buffer, and then synthesizes it with the indirect lighting results of Lumen. Therefore, the present application can achieve higher execution efficiency on the mobile platform.
[0053] Figure 1 Flowchart of the method for implementing real-time global illumination on a mobile terminal in an embodiment of the present invention. Figure 1 As shown, the mobile terminal real-time global illumination implementation method process includes the following steps:
[0054] Step 101, render the shadow map of the image.
[0055] In an embodiment of the present invention, shadows are calculated by ray tracing. The depth of the entire scene is first rendered, and then the depth is compared to determine whether the current rendering pixel is blocked to obtain a shadow map. Since the quality of the rendered pixels obtained by the ray tracing step is related to the number of samples of the emitted light sampling, in order to obtain high-performance execution efficiency at run time, usually only one ray tracing is emitted for each pixel, which leads to an insufficient number of samples of the light sampling, which will generate noise, so noise reduction is required. Through some existing noise reduction algorithm schemes, a high-quality image after noise reduction is obtained, and then the shading process on the entire block chip buffer is entered.
[0056] Step 102, on the block buffer, generate the geometry buffer G-buffer of the Lumen scene according to the shadow map, and calculate the direct illumination in the surface buffer Surface Cache.
[0057] In the embodiment of the present invention, G-Buffer refers to Geometry Buffer, which is different from ordinary rendering of only color into texture. G-Buffer refers to a buffer containing geometric information such as color, normal, reflectivity, metalness, roughness, etc., that is, a texture containing the above information.
[0058] In the embodiment of the present invention, the geometric buffer G-Buffer is first rendered on the block chip buffer through the basic rendering path Base Pass. The basic rendering path is the most basic rendering step, which is to draw all the basic geometric information related to the scene in the current screen, and is used to sample information for subsequent rendering processes for calculation.
[0059] After the base rendering pass BasePass is completed, some necessary geometry buffer G-Buffer data is parsed out. The parsing process is to copy the data in the base rendering pass BasePass from the block chip buffer to the system buffer area, corresponding to the geometry buffer expansion. These geometry data include: intrinsic color, normal, metalness, roughness, reflectivity and depth information. Among them, the intrinsic color, metalness, roughness and reflectivity information are used to color the material; the normal and reflectivity information participate in the lighting calculation; the depth information is used to reconstruct the position in the world space. Because the subsequent final collection step Final Gather needs to randomly sample the geometry buffer G-Buffer, and there is no way to randomly sample on the block chip buffer, so we parse some necessary data to the system cache texture, so that the texture on this system cache can be sampled in the final collection step to obtain the corresponding information.
[0060] Step 103, obtain the accumulated result of light bounces over multiple frames from the voxel lighting of the previous frame to form the final lighting as the indirect lighting of the current frame.
[0061] In the embodiment of the present invention, the base rendering BasePass stage to the lighting Lighting stage are all completed on the entire tile chip buffer area, and the entire rendering process Shading occurs within a rendering pass RenderPass. Therefore, there is no way to insert calculation logic in the rendering pass RenderPass. The final combination Final Gather and the reflection step Reflection in the Lumen process are calculated after the tile chip buffer area, that is, after the entire direct lighting. Finally, the direct lighting and indirect lighting obtained after the shading rendering Shading are combined together as our global lighting rendering result.
[0062] The size of voxels can be divided according to actual needs. Each voxel contains the material information of the current voxel, including but not limited to the following: Albedo, Roughness, Metallic, Alpha, Normal, etc.
[0063] Step 104, the diffuse indirect lighting calculated in the entire Lumen process and the rough mirror indirect lighting calculated in the reflection step are directly added to the direct lighting result calculated in the rendering process to form a global lighting result.
[0064] In the embodiment of the present invention, the rendering pipeline is kept executed on the tile chip buffer as much as possible to obtain higher performance. The reason why the synthesis order can be adjusted in this way is that the direct lighting and the indirect lighting have each correctly calculated the occlusion. The occlusion of the direct lighting comes from the shadow mapping or ray tracing shadow, and the occlusion of the indirect lighting comes from the distance field tracing shadow calculated in the Lumen scene lighting, so they can be correctly combined together. If the occlusion cannot be calculated correctly, the result will be brighter. Finally, we combine it with the indirect lighting of Lumen to get the final image.
[0065] like Figure 2 The figure shows a schematic diagram of the rendering pipeline for a frame of image, where the Lumen scene represents the update process of the entire Lumen scene. From the very beginning, the geometry buffer G-buffer of the Lumen scene LumenScene must be generated first, that is, the surface buffer Surface Cache is generated from the mesh information MeshCard, and then the direct lighting is calculated in the surface buffer SurfaceCache, and then the cumulative result of the multi-frame light bounce is obtained from the voxel lighting Voxel Lighting of the previous frame, forming the final lighting Final Lighting as the indirect lighting of the current frame, and then the final lighting of the current frame is contributed to the voxel lighting of the next frame as the result of multi-frame light bounce. This is the rendering Lumen Scene Lighting process of the entire Lumen scene lighting.
[0066] Figure 2 The rendering scene in the box below represents the mobile rendering pipeline. The rendering process that occurs on the tile chip cache, from the basic rendering BasePass stage to the lighting Lighting stage, is completed on the entire tile chip cache. The entire rendering process Shading occurs within a rendering pass RenderPass. Therefore, there is no way to insert calculation logic in the rendering pass RenderPass. Therefore, the final combination Final Gather and the reflection step Reflection in the Lumen process are calculated after the tile chip cache, that is, after the entire direct lighting. Finally, we combine the direct lighting and indirect lighting obtained after shading rendering Shading as our global lighting rendering result.
[0067] like Figure 3The figure shows the data flow diagram of the entire rendering pipeline, where the shadow map is rendered first. Here, the shadow is calculated by ray tracing. It is necessary to render the depth of the entire scene first, and then compare the depth to determine whether the current rendering pixel is blocked to obtain the shadow map. Since the rendering pixels obtained by the ray tracing step are related to the number of samples of the emitted light sampling, early points will be generated when the number of samples is insufficient, so noise reduction is required. Through some existing noise reduction algorithm solutions, a high-quality image after noise reduction is obtained, and then enters the shading process on the entire block chip buffer.
[0068] The noise reduction algorithm in the embodiment of the present application adopts SVGF (Spatiotemporal Variance-Guided Filter). Based on this algorithm, the data format is re-encoded so that four light sources can be noise-reduced at the same time in one noise reduction calculation, thereby improving the noise reduction efficiency. The four textures used to transmit data are divided into two groups, and each group creates RGBA32UINT and RGBA8 data formats, such as Figure 4 As shown. Each single channel in each texture stores information used for noise reduction calculation on a light source, including blur radius WorldBluringRadius, transmission distance TransmissionDistance, ray miss count MissCount and sampling count SampleCount, and these information are sampled in the noise reduction calculation.
[0069] After re-encoding the above information, a shadow denoising calculation step can calculate the shadows of four light sources at the same time, which greatly reduces the total calculation step overhead for multi-light source shadow denoising. Use these four intermediate texture formats to transfer data back and forth between multiple calculation steps. The output data corresponding to each step is the input data of the next step, so that the four intermediate textures are alternated back and forth, such as Figure 5 shown.
[0070] like Figure 6 The figure shows a schematic diagram of the shadow shading rendering process, in which the geometric buffer G-Buffer is first rendered on the tile chip buffer through the base rendering BasePass. The base rendering pass is the most basic rendering step, which draws all the basic geometric information related to the scene in the current screen to provide calculations for subsequent rendering processes.
[0071] After the base rendering pass is completed, some necessary geometry buffer G-Buffer data is parsed out, that is, Figure 3The geometry buffer in the expansion includes: intrinsic color, normal, metalness, roughness, reflectivity and depth information. The intrinsic color, metalness, roughness and reflectivity information are used to color the material; the normal and reflectivity information are involved in the lighting calculation; the depth information is used to reconstruct the position in the world space. Because the subsequent final collection step Lumen Final Gather needs to randomly sample the geometry buffer G-Buffer, and there is no way to randomly sample on the block chip buffer, so we parse some necessary data to the system cache.
[0072] In the embodiment of the present invention, in order to improve performance on the mobile terminal and make full use of the tile chip buffer for rendering, the synthesis order of Lumen indirect lighting is adjusted, and the synthesis step is placed at the end, so that the previous rendering process can be performed in the tile chip buffer as much as possible to obtain higher performance. The synthesis step is placed at the end, and is actually not executed on the tile chip buffer, but in the system memory, because this step uses a lot of texture random sampling and is implemented based on the compute shader, so it cannot be executed on the tile chip buffer.
[0073] In order to implement the above process, the technical solution of the present invention also provides a mobile terminal real-time global illumination implementation device, and the mobile terminal real-time global illumination implementation device includes:
[0074] Shadow rendering unit, used to render the shadow map of the image;
[0075] The direct lighting calculation unit is used to generate the geometry buffer of the Lumen scene based on the shadow map on the block buffer and calculate the direct lighting in the surface buffer;
[0076] The indirect lighting calculation unit is used to obtain the cumulative result of light bounces from multiple frames from the voxel lighting of the previous frame to form the final lighting as the indirect lighting of the current frame;
[0077] The global illumination acquisition unit is used to directly add the diffuse indirect illumination calculated in the entire Lumen process and the rough mirror indirect illumination calculated in the reflection step to the direct illumination result calculated in the rendering process to form the global illumination result.
[0078] The device also includes:
[0079] A denoising unit is used to perform denoising on the shadow map, re-encode the data format using a spatiotemporal difference guided filtering algorithm, and simultaneously perform denoising on four light sources in one denoising calculation; four textures used to transfer data are divided into two groups, and each group creates RGBA32UINT and RGBA8 data formats; each single channel in each texture stores information on a light source used for denoising calculation, and stores blur radius, transmission distance, ray miss count and sampling count respectively, and samples this information in the denoising calculation; the four intermediate texture formats are used to transfer data back and forth between multiple calculation steps, the output data corresponding to each step is the input data of the next step, and the denoising result is obtained by alternating back and forth between the four intermediate texture formats.
[0080] The device also includes:
[0081] The tile chip buffer is used to complete the entire rendering process from the basic rendering stage to the lighting stage within a rendering pass;
[0082] The direct lighting calculation unit is used to render the geometric buffer G-Buffer through the basic rendering path on the block chip buffer, draw all the basic geometric information related to the scene in the current screen, and use it to sample information for subsequent rendering processes; in the basic rendering path, the selected necessary data is copied from the block chip buffer to the system cache area; the data includes: intrinsic color, normal, metalness, roughness, reflectivity and depth information.
[0083] In summary, the technical solution of the present invention proposes a real-time global illumination implementation solution for mobile terminals. On the block buffer, a geometric buffer of the Lumen scene is generated according to the shadow map, and direct illumination is calculated in the surface buffer. The cumulative result of light bounces over multiple frames is obtained from the voxel illumination of the previous frame, and the final illumination is formed as the indirect illumination of the current frame. The diffuse indirect illumination calculated in the entire process and the indirect illumination of the rough mirror calculated in the reflection step are directly added to the direct illumination result calculated in the rendering process to form the global illumination result. The solution of the present invention makes full use of the block chip buffer for rendering, puts the Lumen synthesis step at the end, and allows the previous rendering process to occur in the block chip buffer as much as possible to obtain higher performance, thereby realizing an efficient global illumination solution on the mobile terminal.
[0084] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.
[0085] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0086] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0087] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0088] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for implementing real-time global illumination on a mobile terminal, characterized in that: The following steps are involved: Render the shadow map of the image; On the tile chip buffer, the geometry buffer of the Lumen scene is generated according to the shadow map, and the direct lighting is calculated in the surface buffer; Obtain the cumulative result of light bounces from multiple frames from the voxel lighting of the previous frame to form the final lighting as the indirect lighting of the current frame; The diffuse indirect lighting calculated in the entire Lumen process and the indirect lighting of the rough mirror calculated in the reflection step are directly added to the direct lighting result calculated in the rendering process to form the global illumination result; The method further comprises: The shadow image is subjected to noise reduction processing, specifically comprising: The data format is re-encoded using a spatial-temporal difference guided filtering algorithm, and four light sources are denoised simultaneously in one denoising calculation; Divide the four textures used to transfer data into two groups, and create RGBA32UINT and RGBA8 data formats in each group; Each single channel in each texture stores information used for noise reduction calculation on a light source, including blur radius, transmission distance, ray miss count and sampling count, and samples these information in noise reduction calculation; The method further comprises: From the basic rendering stage to the lighting stage, everything is done on the entire tile chip buffer, and the entire rendering process occurs within one rendering pass; The final combination and reflection steps are calculated after the tile chip buffer, after the entire direct lighting; Finally, the direct lighting and indirect lighting obtained by shading rendering are combined together as the rendering result of global illumination.
2. A method for implementing real-time global illumination on a mobile terminal according to claim 1, characterized in that: The shadow map of the rendered image includes: Calculate shadows through ray tracing; first render the depth of the entire scene, then compare the depth to determine whether the current rendered pixel is blocked, and get a shadow map.
3. A method for implementing real-time global illumination on a mobile terminal according to claim 1, characterized in that: The method further comprises: Use 4 intermediate texture formats to pass data back and forth between multiple calculation steps. The output data corresponding to each step is the input data of the next step. Alternate back and forth between the 4 intermediate texture formats to obtain the denoising result.
4. A method for implementing real-time global illumination on a mobile terminal according to claim 1, characterized in that: The method generates a geometry buffer of the Lumen scene based on the shadow map on the block chip buffer and calculates direct lighting in the surface buffer, including: The geometry buffer G-Buffer is first rendered through the basic rendering path on the block chip buffer to draw all the basic geometric information related to the scene on the current screen for sampling information for subsequent rendering processes.
5. A method for implementing real-time global illumination on a mobile terminal according to claim 4, characterized in that: The method further comprises: Selected data is copied in a base rendering pass from a tile chip buffer to a system buffer; the data includes intrinsic color, normal, metalness, roughness, reflectivity, and depth information.
6. A mobile terminal real-time global illumination implementation device, characterized in that: include: Shadow rendering unit, used to render the shadow map of the image; Direct lighting calculation unit, used to generate the geometry buffer of the Lumen scene based on the shadow map on the tile chip buffer, and calculate direct lighting in the surface buffer; The indirect lighting calculation unit is used to obtain the cumulative result of light bounces from multiple frames from the voxel lighting of the previous frame to form the final lighting as the indirect lighting of the current frame; The global illumination acquisition unit is used to directly add the diffuse indirect illumination calculated in the entire Lumen process and the rough mirror indirect illumination calculated in the reflection step to the direct illumination result calculated in the rendering process to form the global illumination result; The tile chip buffer is used to complete the entire rendering process from the basic rendering stage to the lighting stage within a rendering pass; The entire rendering process occurs within a rendering pass; The final combination and reflection steps are calculated after the tile chip buffer, after the entire direct lighting; Finally, the direct lighting and indirect lighting obtained by shading rendering are combined together as the rendering result of global illumination; The device also includes: A denoising unit is used to perform denoising on the shadow map, re-encode the data format using a temporal and spatial difference guided filtering algorithm, and denoise four light sources simultaneously in one denoising calculation; four textures for transmitting data are divided into two groups, and each group creates RGBA32UINT and RGBA8 data formats; each single channel in each texture stores information on a light source for denoising calculation, and stores blur radius, transmission distance, ray miss count and sampling count respectively, and samples these information in the denoising calculation; The four intermediate texture formats are used to transfer data back and forth between multiple calculation steps, and the output data corresponding to each step is the input data of the next step. The noise reduction result is obtained by alternating back and forth between the four intermediate texture formats.
7. The device for realizing real-time global illumination on a mobile terminal according to claim 6, characterized in that: The direct illumination calculation unit is used to render the geometric buffer G-Buffer through the basic rendering path on the block chip buffer, draw all the basic geometric information related to the scene in the current screen, and use it to sample information for subsequent rendering processes; Selected data is copied in a base rendering pass from a tile chip buffer to a system buffer; the data includes intrinsic color, normal, metalness, roughness, reflectivity, and depth information.