A 2d normal reconstruction light filling method using multi-target rendering buffer

By extracting multi-dimensional image features in parallel through a multi-target rendering buffer and performing dynamic weight adjustment and spatiotemporal optimization, the problems of low rendering efficiency and unstable effects in existing technologies are solved, achieving efficient and high-precision normal reconstruction and improving the three-dimensionality and lighting realism of the image.

CN122223209BActive Publication Date: 2026-07-31CHENGDU LIBI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHENGDU LIBI TECH CO LTD
Filing Date
2026-05-18
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

In existing technologies, multi-channel rendering mechanisms lead to repeated GPU resource consumption and context switching overhead, making it difficult to meet the requirements of high frame rate real-time rendering. Furthermore, the normal reconstruction process lacks adaptive and feedback optimization, resulting in unstable normal quality and rendering effects.

Method used

In a single rendering process, brightness, gradient, and local structure confidence maps are extracted in parallel using a multi-target rendering buffer. The weights are dynamically adjusted by combining the confidence maps and optimization requirement feedback maps, normal vector fusion is performed, and spatiotemporal joint optimization is carried out to generate efficient and high-precision normal maps.

Benefits of technology

It improves the overall processing efficiency of the normal reconstruction process, and the generated normal maps have temporal stability and spatial continuity, which enhances the stereoscopic effect and lighting realism of 2D images and reduces resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122223209B_ABST
    Figure CN122223209B_ABST
Patent Text Reader

Abstract

This invention discloses a 2D normal reconstruction lighting method utilizing a multi-objective rendering buffer, belonging to the field of computer graphics technology. The method includes configuring a buffer and inputting the original 2D texture; in a single rendering pass, extracting and storing brightness, gradient, and local structure confidence maps in parallel; generating a quality prediction map based on the confidence maps, and dynamically adjusting the weights of brightness and gradient maps in subsequent vector fusion by combining an optimization requirement feedback map; performing vector fusion using the adjusted weights, light source direction, and extracted feature maps to calculate and generate preliminary 3D normal data; performing spatiotemporal joint optimization on this data to obtain a reconstructed normal map; and using this normal map to render the original texture using dynamic light source parameters. This invention achieves efficient and high-precision normal map reconstruction through parallel extraction and collaborative fusion of multi-dimensional image features via a single GPU channel, improving the stereoscopic effect and lighting realism of 2D images, with low resource consumption and easy integration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer graphics technology, and in particular to a 2D normal reconstruction lighting method utilizing a multi-target rendering buffer. Background Technology

[0002] In the field of computer graphics, particularly in image post-processing, game development, and virtual reality applications, the detail rendering capability of 2D texture images often limits the realism of their 3D perception. To enhance the stereoscopic effect and lighting representation of 2D images without constructing complex 3D geometric models, normal mapping technology has been introduced. A normal map is a special texture that stores information about the direction of surface normals. It can be used to simulate the unevenness of an object's surface during rendering, thereby achieving a pseudo-3D effect based on lighting. Its core lies in converting 2D texture information into normal vectors in 3D space, and then interacting with the light source for calculation during the rendering process.

[0003] In existing technologies, methods for generating normal maps typically involve extracting features such as brightness and edges from a 2D texture, then combining these features to derive the 3D surface normal for each pixel. For example, some methods might first calculate the grayscale image of the texture, then use filtering operators to extract edge gradients, and finally combine these gradients with an assumed z-component to construct the normal vector. In actual rendering workflows, to obtain different types of image features, multiple independent rendering passes are often required. Each pass is responsible for calculating and outputting a specific intermediate result, and then these results are synthesized.

[0004] However, existing technical solutions have the following drawbacks. First, multi-channel rendering mechanisms lead to redundant GPU resource consumption and context switching overhead, reducing overall processing efficiency and making it difficult to meet the demands of high frame rate real-time rendering. Second, since the extraction of different features is performed independently in different channels, there may be temporal or spatial inconsistencies between feature maps. This can easily lead to error accumulation during subsequent fusion, generating normal maps with noise, blurriness, or inaccurate details. Furthermore, most existing methods lack adaptive and feedback optimization mechanisms for the normal reconstruction process. Once the input texture content or lighting conditions change, their fixed algorithm strategies may fail to output high-quality results, leading to instability in normal quality and rendering effects. Summary of the Invention

[0005] To address the aforementioned issues, this invention provides a 2D normal map reconstruction and lighting method utilizing a multi-target rendering buffer. By extracting and collaboratively fusing multi-dimensional image features in parallel through a single GPU channel, it achieves efficient and high-precision reconstruction of normal maps, enhancing the stereoscopic effect and lighting realism of 2D images. This method is resource-efficient and easy to integrate.

[0006] The above objectives can be achieved through the following approach:

[0007] A 2D normal reconstruction lighting method utilizing a multi-objective rendering buffer includes configuring the buffer and inputting the original 2D texture; in a single rendering, extracting and storing confidence maps of brightness, gradient, and local structure in parallel; generating a quality prediction map based on the confidence maps, and dynamically adjusting the weights of brightness and gradient maps in subsequent vector fusion by combining an optimization requirement feedback map; performing vector fusion using the adjusted weights, light source direction, and extracted feature maps to calculate and generate preliminary 3D normal data; performing spatiotemporal joint optimization on this data to obtain a reconstructed normal map; and using this normal map to perform lighting rendering on the original texture, combined with dynamic light source parameters.

[0008] Optionally, the dynamic adjustment of the weight parameters of the brightness feature map and the gradient feature map in the vector fusion calculation includes: identifying low-confidence regions marked in the quality prediction map and applying a first weight configuration to the low-confidence regions, wherein the first weight configuration increases the weight of the brightness feature map; identifying residual problem regions marked in the optimization requirement feedback map and applying a second weight configuration to the residual problem regions, wherein the second weight configuration increases the weight of the gradient feature map, or triggering a recalculation of the local gradient features of the residual problem regions.

[0009] Optionally, the spatiotemporal joint optimization processing of the preliminary 3D normal data includes: acquiring the historical reconstructed normal map and historical optimization requirement feedback map generated in the previous frame; using the historical reconstructed normal map to perform temporal domain filtering on the preliminary 3D normal data to obtain temporally stable normal data, which is used to overcome the flickering or jitter problems that may occur in the preliminary 3D normal data; performing spatial domain denoising and detail enhancement processing on the temporally stable normal data to obtain a reconstructed normal map; analyzing the uncertainty of the temporally stable normal data in spatial domain processing, and generating the optimization requirement feedback map of the current frame.

[0010] Optionally, the step of performing temporal domain filtering on the preliminary 3D normal data using the historical reconstructed normal map includes: calculating the difference in normal vectors between the preliminary 3D normal data and the historical reconstructed normal map at corresponding pixel positions; adaptively determining temporal filtering coefficients based on the difference in normal vectors between the historical optimization requirement feedback map and the normal map; and using the temporal filtering coefficients to perform weighted fusion of the preliminary 3D normal data and the historical reconstructed normal map to obtain temporally stable normal data.

[0011] Optionally, configuring the multi-target rendering buffer and inputting the original 2D texture to be processed includes: performing basic initialization, attachment orientation configuration, and adaptation and binding with the graphics rendering pipeline for the multi-target rendering buffer, so that its resolution, color format, etc. match the original 2D texture and support parallel writing and storage of multiple feature maps; loading and verifying the original 2D texture to be processed and unifying its format, and after completing pipeline input, sampling settings, and spatial matching with the rendering buffer, inputting it into the configured multi-target rendering buffer.

[0012] Optionally, the reconstructed normal map further includes: downsampling the reconstructed normal map to generate a low-resolution normal layer; performing detail enhancement and noise smoothing on the reconstructed normal map and the low-resolution normal layer respectively; upsampling the processed low-resolution normal layer and weighted combining it with the processed high-resolution normal layer to generate a final normal map for the lighting rendering.

[0013] Optionally, the step of generating preliminary three-dimensional normal data by performing vector fusion calculation using the weight parameters, the direction parameters of the preset light source direction, the brightness feature map, and the gradient feature map includes: converting each pixel value in the brightness feature map into a virtual height field, the virtual height field being used to simulate the height information of the object surface corresponding to the pixel value; and performing fusion calculation using the virtual height field, the gradient feature map, the direction parameters of the preset light source direction, and the weight parameters to generate preliminary three-dimensional normal data.

[0014] Optionally, the step of combining the acquired dynamic light source parameters and using the reconstructed normal map to perform lighting rendering on the original two-dimensional texture includes: calculating the diffuse light intensity and specular highlight intensity of each pixel based on the dynamic light source parameters and the reconstructed normal map; acquiring the background color information of the original two-dimensional texture, and superimposing and synthesizing the background color information with the diffuse light intensity and the specular highlight intensity to generate an output image with three-dimensional lighting effects.

[0015] Optionally, the method further includes: recording the statistical characteristics of the optimization demand feedback map generated under different light source orientation parameters; and predicting and recommending the light source orientation adjustment strategy for the next moment based on the statistical characteristics and the expected change trend of the dynamic light source parameters.

[0016] Based on the same inventive concept, this invention also provides a 2D normal reconstruction lighting system utilizing a multi-target rendering buffer. The system includes: a texture input and buffer management module for configuring the multi-target rendering buffer and inputting the original 2D texture to be processed; a parallel feature extraction module for extracting the brightness feature map, gradient feature map, and local structure confidence map of the original 2D texture in parallel during a single rendering process; a feature classification and storage module for storing the brightness feature map, gradient feature map, and local structure confidence map in different attachments of the multi-target rendering buffer, wherein the local structure confidence map is used to evaluate the ease with which each region in the original 2D texture generates a reliable normal vector; and an adaptive... The system includes a weighted decision module for generating a quality prediction map based on the local structure confidence map, and dynamically adjusting the weight parameters of the brightness feature map and the gradient feature map in vector fusion calculation according to the quality prediction map and the received optimization requirement feedback map; a vector fusion calculation module for performing vector fusion calculation using the weight parameters, the direction parameters of the preset light source direction, the brightness feature map, and the gradient feature map to generate preliminary three-dimensional normal data; a spatiotemporal joint optimization module for performing spatiotemporal joint optimization processing on the preliminary three-dimensional normal data to obtain a reconstructed normal map; and a dynamic lighting rendering module for performing lighting rendering on the original two-dimensional texture using the reconstructed normal map, in conjunction with the acquired dynamic light source parameters.

[0017] Compared with the prior art, the present invention has the following advantages:

[0018] This invention utilizes a multi-target rendering buffer to extract multiple feature maps, such as brightness, gradient, and confidence, of the original 2D texture in parallel during a single rendering process. Compared with traditional techniques that require multiple rendering passes, this reduces the rendering call overhead and state switching cost of the graphics processing unit, improves the overall processing efficiency of the normal reconstruction process, and provides performance assurance for real-time dynamic lighting rendering applications.

[0019] This invention establishes a closed-loop adaptive weight adjustment mechanism. By introducing a local structure confidence map for quality prediction and combining it with an optimization requirement feedback map generated after spatiotemporal optimization, the system can dynamically adjust the weights of brightness and gradient features in normal fusion calculation. It adopts optimal processing strategies for the characteristics of different regions of the image, thereby improving the accuracy and robustness of normal vector generation under different conditions such as complex textures, flat regions, and edges.

[0020] This invention employs a spatiotemporal joint optimization processing technique. By combining historical frame information to perform temporal domain filtering on the current normal data, it suppresses inter-frame normal jumps caused by minor changes in input texture or algorithm noise, eliminating flickering and jitter in the rendering results. Simultaneously, spatial domain denoising and detail enhancement further smooth the normal distribution and preserve key structures. The resulting reconstructed normal map exhibits high temporal stability and spatial continuity, ensuring visual smoothness and realism in the final lighting effect.

[0021] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures pointed out in the description, claims and drawings. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 This is a flowchart illustrating a 2D normal reconstruction lighting method using a multi-target rendering buffer, according to an embodiment of the present invention.

[0024] Figure 2 This is a schematic diagram of the adaptive weight decision logic surface according to an embodiment of the present invention.

[0025] Figure 3 This is the final effect diagram of the adaptive weight decision logic surface in an embodiment of the present invention.

[0026] Figure 4 This is a schematic diagram of the reconstructed normal map according to an embodiment of the present invention.

[0027] Figure 5 This is the final effect diagram of the reconstructed normal map according to an embodiment of the present invention.

[0028] Figure 6 This is a schematic diagram of a 2D normal reconstruction lighting system utilizing a multi-target rendering buffer, according to an embodiment of the present invention. Detailed Implementation

[0029] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0030] Reference Figure 1 One embodiment of the present invention proposes a 2D normal reconstruction lighting method using a multi-target rendering buffer. By extracting and collaboratively fusing multi-dimensional image features in parallel through a single GPU channel, it achieves efficient and high-precision reconstruction of normal maps, improves the stereoscopic effect and lighting realism of 2D images, consumes low resources, and is easy to integrate.

[0031] The method described in this embodiment specifically includes:

[0032] S1. Configure the multi-target rendering buffer and input the original 2D texture to be processed;

[0033] Optionally, configuring the multi-target rendering buffer and inputting the original 2D texture to be processed includes:

[0034] Perform basic initialization and attachment orientation configuration on the multi-target rendering buffer and adapt and bind it to the graphics rendering pipeline to match its resolution, color format and other properties with the original 2D texture and support parallel writing of multiple feature maps to storage.

[0035] Load and validate the original 2D texture to be processed and unify its format. After completing pipeline input, sampling settings and spatial matching with the rendering buffer, input it into the configured multi-target rendering buffer.

[0036] Specifically, the first part of this process is the configuration of the multi-target rendering buffer (FBO). First, basic initialization is performed, creating a framebuffer object at the graphics API level. This is a GPU-managed data structure used for off-screen rendering. Next, attachment-oriented configuration is performed, meaning the system creates multiple independent 2D textures as color attachments for the FBO. For example, three texture attachments are created to store the luminance feature map, gradient feature map, and local structure confidence map, respectively. The resolution of these attachments must be exactly the same as the original 2D texture to be processed, such as 1920×1080 pixels, to ensure pixel-level precision. Simultaneously, their internal color format is optimized based on the characteristics of the stored data. For example, the single-channel luminance and confidence maps can use the high-precision floating-point format R32F or R16F, while the gradient map containing x and y components uses the RG32F format to ensure no loss of data precision during calculation. After attachment creation, these textures are bound to different color attachment points of the FBO and adapted to the current graphics rendering pipeline, activating the MRT write mode.

[0037] The process begins by loading the raw 2D texture data to be processed and performing basic validity checks, such as checking for file existence or data corruption. Next, to ensure consistency across the rendering pipeline, textures from different sources are standardized to a standard internal format, such as RGBA8. Then, a GPU texture object is created, the processed pixel data is uploaded to video memory, and pipeline input settings are completed, binding the texture to a specific texture unit for sampling by the shader program. Sampling settings are also completed at this stage, including setting filtering modes (e.g., linear filtering) and addressing modes (e.g., edge clamping) to control the behavior when reading texture data. Finally, to achieve spatial matching with the render buffer, a quadrilateral covering the entire viewport is typically drawn. This ensures that each fragment in the rendering process accurately corresponds to a pixel at the same position on the raw 2D texture, thus feeding the texture as input into the configured multi-target render buffer, awaiting the next step of parallel feature extraction.

[0038] For example, when configuring a multi-target rendering buffer and inputting the raw 2D texture to be processed, the system first creates a framebuffer object at the graphics interface layer and performs basic initialization and attachment orientation configuration. To support parallel writing of multiple feature maps, the system creates three independent texture attachments to store the brightness feature map, gradient feature map, and local structure confidence map, respectively. The resolution of these attachments must be exactly the same as the raw 2D texture, and a high-precision floating-point format is selected according to the data characteristics to ensure that data precision is not lost during calculation. After the attachments are created, they are bound to different color attachment points of the framebuffer object and adapted to the graphics rendering pipeline, activating the multi-target rendering write mode. Subsequently, the system loads the raw 2D texture data to be processed and verifies it, unifying its internal format to a standard format to ensure consistency in pipeline processing. The system creates a graphics processing unit texture object and uploads the pixel data to the video memory, setting the filtering mode to linear filtering and the addressing mode to edge clamping. To achieve spatial matching between the rendering buffer and the raw texture, the system draws a quadrilateral covering the entire viewport to ensure that each fragment in the rendering process accurately corresponds to the same pixel in the raw texture. At this point, the texture data input into the configured multi-target rendering buffer is spatially perfectly matched, thus providing a complete hardware environment and data foundation for the subsequent shader program to extract multi-dimensional image features in parallel during a single rendering.

[0039] S2. During a single rendering process, the brightness feature map, gradient feature map, and local structure confidence map of the original two-dimensional texture are extracted in parallel.

[0040] Specifically, in a single rendering process, the input original 2D texture is sampled once by the graphics processor's shader program. Utilizing the parallel output characteristics of the multi-target rendering buffer, a brightness feature map, gradient feature map, and local structure confidence map are simultaneously acquired. The color information of the target pixels and their neighboring pixels in the original 2D texture is obtained through a sampling function. The brightness feature map calculates the lightness representation based on pixel color values, reflecting the basic light and dark distribution. The gradient feature map is obtained by calculating the numerical differences between a pixel and its neighboring pixels in the horizontal and vertical directions, representing the edge strength and direction of the texture. The local structure confidence map is used to evaluate the ease with which reliable normal vectors are generated for each region in the original 2D texture. This confidence score analyzes the continuity and complexity of pixel features within a local region; if the features are blurry or noisy, the confidence score is low. To achieve vector fusion calculation, the pixel values ​​in the brightness feature map are converted into a virtual height field to simulate the microscopic undulations of the object's surface. The generation of the initial 3D normal data is jointly determined by the brightness feature weights, gradient feature weights, the spatial derivative of the virtual height field, the gradient feature vector, and preset light source direction parameters. The luminance feature weights and gradient feature weights are dynamically adjusted by the adaptive weight decision module based on the quality prediction map generated by the local structure confidence map and the optimization requirement feedback map from the previous frame. For example, in identified low-confidence regions, the luminance feature weights are increased; while in residual problem regions, the gradient feature weights are increased or local gradient recalculation is triggered. All extracted feature maps are stored separately in different attachments of the multi-objective rendering buffer, ensuring complete data support for subsequent spatiotemporal joint optimization and dynamic lighting rendering within a single rendering pipeline.

[0041] S3. Store the brightness feature map, the gradient feature map, and the local structure confidence map in different attachments of the multi-target rendering buffer. The local structure confidence map is used to evaluate the ease with which each region in the original two-dimensional texture generates a reliable normal vector.

[0042] Specifically, after parallel feature extraction, the acquired feature information needs to be categorized, stored, and associated. By configuring the multi-target rendering buffer (MRT) in the graphics rendering pipeline, the shader can simultaneously write data to multiple color attachments when processing a single pixel. During the operation, the calculated brightness feature map of the original 2D texture is stored in the first attachment, the gradient feature map in the second attachment, and the local structure confidence map in the third attachment. The local structure confidence map is a reference layer specifically used to quantify the difficulty of generating reliable normal vectors for each local region in the original 2D texture. This confidence level is obtained by analyzing the continuity and complexity of local pixel features. When the texture features of a pixel region are clear and consistent in direction, a higher confidence value is assigned; if the features are too blurry or too noisy, a lower value is assigned. This categorized storage method ensures that the subsequent adaptive weight decision module can directly retrieve data from specific attachments, thereby dynamically intervening in the weight allocation during vector fusion calculation based on the quality prediction map generated by the local structure confidence map. To transform these stored features into final geometric information, a weighted fusion calculation is performed using the brightness feature map, gradient feature map, orientation parameters of the preset light source direction, and weight parameters determined by the quality prediction map and the optimization requirement feedback map, thereby generating preliminary 3D normal data. Each pixel value in the brightness feature map is converted into a virtual height field to simulate the height information of the object's surface, and together with the gradient feature map, forms a direction vector. When the quality prediction map identifies a low-confidence region, the weight of the brightness feature map is automatically increased through a first weight configuration. Conversely, when the optimization requirement feedback map identifies a residual problem region, the weight of the gradient feature map is increased through a second weight configuration, or a local recalculation is triggered. All feature components involved in the calculation are normalized to ensure compliance with the logical laws of spatial geometry and physical optics during vector fusion.

[0043] S4. Generate a quality prediction map based on the local structure confidence map, and dynamically adjust the weight parameters of the brightness feature map and the gradient feature map in the vector fusion calculation according to the quality prediction map and the received optimization requirement feedback map;

[0044] Optionally, the dynamic adjustment of the weight parameters of the brightness feature map and the gradient feature map in the vector fusion calculation includes:

[0045] Identify the low-confidence regions marked in the quality prediction map, and apply a first weight configuration to the low-confidence regions, wherein the first weight configuration increases the weight of the brightness feature map;

[0046] Identify the residual problem regions marked in the optimization requirement feedback graph, and apply a second weight configuration to the residual problem regions. The second weight configuration increases the weight of the gradient feature graph, or triggers the recalculation of the local gradient features of the residual problem regions.

[0047] Specifically, two key data maps are received in parallel: the first is a quality prediction map generated based on the local structure confidence map, which identifies regions in the original 2D texture where reliable normal vectors are difficult to generate due to lack of detail or poor lighting conditions; the second is an optimization requirement feedback map generated after spatiotemporal joint optimization processing of the previous frame, which serves as an error signal, precisely indicating residual problem areas in the normal map where temporal jitter or spatial defects still exist. These two maps are processed in parallel to determine the final weight configuration. The first process identifies low-confidence regions in the quality prediction map by comparing the confidence value of each pixel in the map with a preset low-confidence threshold, such as 0.3. For all pixels below this threshold, a first weight configuration is applied. This configuration essentially increases the weight of the brightness feature map in subsequent vector fusion calculations. A schematic diagram of the adaptive weight decision logic surface is shown below. Figure 2 As shown, the final effect diagram of the adaptive weight decision logic surface is as follows: Figure 3 As shown.

[0048] Residual problem regions in the feedback map of optimization requirements are identified by comparing the feedback values ​​of pixels in the map with a preset problem feedback threshold, such as 0.75. For all pixels above this threshold, a second weight configuration is applied. This configuration increases the weight of the gradient feature map, aiming to use the high-frequency details carried by the gradient information to repair areas that were over-smoothed or lost details in the previous frame. Furthermore, if a region is identified as a residual problem region for multiple consecutive frames, an alternative strategy is triggered: local gradient feature recalculation is performed on that region, for example, by using a larger filter kernel or enabling sharpening preprocessing to enhance the structural features of the region before gradient extraction. To digitally implement the above logic, the weight parameters of each pixel ultimately used in the brightness feature map are calculated using the following formula. : In this formula, This represents a global baseline weight, typically set to 0.5. It is the normalized confidence value obtained from the quality prediction chart, and its value range is from 0 to 1. It is the normalized error feedback value obtained from the optimization demand feedback diagram, and its value range is also from 0 to 1. and It is a moderating factor used to control the strength of the two adjustment strategies, and its value is usually between 0.5 and 1.0. The function ensures the final weight The weight parameters of the gradient feature map are constrained to an effective range of 0.0 to 1.0. Then directly from The output of this process is a set of dynamically adjusted weight parameters, which will be directly input into the subsequent vector fusion calculation module.

[0049] For example, suppose the system is processing a frame of raw 2D texture. During a single rendering process, the adaptive weight decision module receives two key data maps in parallel. The first is a quality prediction map generated based on the local structure confidence map, where the normalized confidence value of a specific pixel is... The value is 0.2. The second image is the optimization requirement feedback map generated after the spatiotemporal joint optimization processing of the previous frame, showing the normalized error feedback value corresponding to this pixel. The system sets the global baseline weight to 0.1. The adjustment factor is 0.5. It is 0.8. It is 0.6. Because of this pixel... If the value is below a preset threshold of 0.3, the system identifies it as a low-confidence region and triggers the first weight configuration to increase the weight of the brightness feature map. The weight is calculated according to the weight calculation formula. Substituting the values ​​yields... ,pass After function constraints, the final brightness feature map weight parameters It is 1.0. Then, according to the formula... Calculate the gradient feature map weight parameters to obtain The value is 0.0. At this point, the region relies entirely on the virtual height field derived from the brightness feature map to generate the normal vector. If another pixel... If the value is 0.8, which is higher than the problem feedback threshold of 0.75, the system identifies it as a residual problem area and increases the gradient feature map weight or triggers local gradient feature recalculation through the second weight configuration in order to use high-frequency details to fix the flaws.

[0050] S5. Using the weight parameters, the direction parameters of the preset light source direction, the brightness feature map and the gradient feature map, perform vector fusion calculation to generate preliminary three-dimensional normal data; Optionally, the step of using the weight parameters, the orientation parameters of the preset light source direction, the brightness feature map, and the gradient feature map to perform vector fusion calculation to generate preliminary three-dimensional normal data includes: Each pixel value in the brightness feature map is converted into a virtual height field, which is used to simulate the height information of the object surface corresponding to the pixel value. The virtual height field, the gradient feature map, the direction parameter of the preset light source direction, and the weight parameter are fused and calculated to generate preliminary three-dimensional normal data.

[0051] Specifically, an interpretive transformation is performed on the input brightness feature map, directly mapping the normalized brightness value of each pixel to a height value in a virtual height field. This virtual height field is not a realistically constructed 3D model, but rather an instantaneously calculated concept that assumes the brighter the pixel, the higher its corresponding point on the virtual surface. This assumption provides the basis for deriving surface normals from brightness information, because the gradient of height changes can be calculated from this virtual height field, and thus the normals can be derived.

[0052] The parallel normal vector generation stage begins. Two candidate normal vectors are calculated based on two independent logical paths. The first path is based on a virtual height field. By applying a finite difference method, such as the Sobel operator, to the virtual height field, the virtual slope of each pixel in the X and Y directions is calculated. Then, combined with the preset direction parameters of the light source direction, a brightness-based normal vector is calculated. The second path is based on a gradient feature map. The two-dimensional gradient vector stored in the gradient feature map directly describes the direction and magnitude of the fastest changes in image brightness. Through simple geometric transformations, a gradient-based normal vector can also be generated.

[0053] A vector fusion calculation is performed, which involves weighted averaging of the normal vectors generated from the two paths to produce preliminary 3D normal data. This fusion process is precisely controlled by weight parameters dynamically generated in the previous steps. This calculation process can be expressed by the following formula: In this formula, It is the initial 3D normal vector output. It is a brightness-based normal vector derived from the virtual height field and the direction of the light source. It is a gradient-based normal vector directly converted from the gradient feature map. and These are weight parameters obtained from the dynamic adjustment module, corresponding to brightness and gradient path respectively. They may be different at each pixel, and their sum is 1. The function ensures that the final generated It is a unit vector, conforming to the definition of a normal vector. The output of this step is a preliminary 3D normal data map with the same resolution as the original 2D texture, which will be fed as input into the subsequent spatiotemporal joint optimization processing flow.

[0054] For example, when generating preliminary 3D normal data using weight parameters, orientation parameters of a preset light source direction, brightness feature maps, and gradient feature maps, the system first performs an interpretative transformation on the input brightness feature map. The normalized brightness value of each pixel in the brightness feature map is directly mapped to a height value in the virtual height field. This process assumes that the brighter the pixel, the higher the corresponding point on the virtual surface, thus providing a basis for deriving the surface normals. Subsequently, a parallel normal vector generation stage begins. The first path uses the finite difference method to calculate the virtual height field and, combined with the orientation parameters of the preset light source direction, calculates the brightness-based normal vector. The second path directly utilizes the two-dimensional gradient vectors stored in the gradient feature map to perform geometric transformations, generating gradient-based normal vectors. Set the brightness feature weight parameters for the current pixel, determined by the dynamic adjustment module. If it is 0.6, then the gradient feature weight parameter The value is 0.4. Assume the brightness-based normal vector is derived from the virtual height field and the light source direction. The gradient-based normal vector obtained directly from the gradient feature map... Calculations are performed based on the vector fusion calculation formula. The result is Calculate the magnitude of the synthesized vector. Normalization ensures that it is a unit vector. The output preliminary 3D normal data map fully preserves the geometric contributions of the two feature paths and strictly conforms to the definitions of spatial geometry and physical optics. It is then sent to the spatiotemporal joint optimization process.

[0055] S6. Perform spatiotemporal joint optimization processing on the preliminary three-dimensional normal data to obtain a reconstructed normal map;

[0056] Optionally, the spatiotemporal joint optimization processing of the preliminary three-dimensional normal data includes:

[0057] Obtain the historical reconstructed normal map and historical optimization requirement feedback map generated in the previous frame;

[0058] The preliminary 3D normal data is filtered in the time domain using the historical reconstructed normal map to obtain temporally stable normal data. The temporally stable normal data is used to overcome the flickering or jittering problems that may occur in the preliminary 3D normal data.

[0059] Spatial domain denoising and detail enhancement are performed on the temporally stable normal data to obtain a reconstructed normal map.

[0060] The uncertainty of the temporally stable normal data in spatial domain processing is analyzed to generate an optimization requirement feedback map for the current frame.

[0061] Specifically, the historical reconstructed normal map and historical optimization requirement feedback map successfully generated in the previous frame are retrieved from the historical frame buffer as reference benchmarks for temporal domain processing. The first step in the core process is temporal domain filtering. The preliminary 3D normal data generated in the current frame is fused with the acquired historical reconstructed normal map at the pixel level.

[0062] Utilizing the stabilized result of the previous frame to smooth out potential abrupt changes or flickering in the current frame is crucial for processing continuous video streams or dynamic textures. The fusion process generates intermediate products, namely, domain-stabilized normal data, which reduces high-frequency jitter of the normals along the time axis.

[0063] Spatial domain denoising and detail enhancement are performed on the temporally stable normal data. This step optimizes the quality of a single frame. Denoising is performed using bilateral filtering or guided filtering with edge-preserving filters. These filters can smooth noise while effectively protecting or even enhancing edges generated by real geometry, preventing the normal map from becoming blurry. Detail enhancement can be achieved by applying local contrast enhancement algorithms or desharpening masks, aiming to enable the normal map to more accurately represent the subtle bumps and depressions in the original 2D texture. The final output of this step is the reconstructed normal map for the current frame, as illustrated in the diagram below. Figure 4 As shown, the final result of reconstructing the normal map is as follows. Figure 5 As shown.

[0064] Simultaneously with spatial domain processing, the uncertainties introduced by this process are analyzed, and an optimization requirement feedback map for the current frame is generated based on this analysis. The quantification index of uncertainty can be a composite value, combining the magnitude of the spatial filter's modification of the normal vector of a specific pixel with the consistency of the normal vectors within that pixel's neighborhood. A larger modification magnitude or poorer neighborhood consistency indicates a lower confidence level in the normal reconstruction at that location. This uncertainty is quantified into a feedback value using the following formula. :

[0065] In this formula, These are the pixel values ​​written into the current frame's optimization requirement feedback map. It is the normal vector in the time-domain stable normal data before input space processing. It is the final normal vector output to the reconstructed normal map after denoising and enhancement processing. It is the dot product of two vectors. This reflects the degree to which spatial processing alters the direction of the normal. It is the local variance calculated from time-domain stable normal data within a neighborhood of, for example, 5×5, and is used to measure the inherent complexity or noise level of the region. and It is a preset weighting coefficient used to balance the impact of the modification magnitude and local complexity, and its value range is usually between 0.4 and 0.8. It is a saturation function, ensuring the final feedback value It is restricted to a normalized range of 0 to 1. This optimization requirement feedback graph will serve as an important basis for dynamically adjusting the weight parameters in the next frame.

[0066] For example, when performing spatiotemporal joint optimization processing on the preliminary 3D normal data, the system first retrieves the historical reconstructed normal map and historical optimization requirement feedback map generated in the previous frame from the historical frame buffer. Assume the preliminary 3D normal vector generated for the current pixel is... The vector of the historical reconstruction normal map at the corresponding position is... The system performs time-domain filtering by calculating the dot product of the two. The system identifies normal differences and generates temporally stable normal data by combining historical feedback values ​​to overcome flickering. It then proceeds to the spatial domain denoising and detail enhancement stage, using bilateral filters to smooth noise and enhance edge structures, outputting the reconstructed normal map for the current frame. To quantify uncertainties during the processing and generate an optimization feedback map for the next frame, the system analyzes the changes in vectors before and after spatial domain processing. Weighting coefficients are then set. and Assuming the final normal vector after spatial processing is Then the dot product Simultaneously calculate the pixel Local variance of time-domain stable normal data within the neighborhood Substitute the data to derive the derivation. The calculated result is 0.0212. This normalized feedback value is written into the current frame's optimization requirement feedback graph and used as the basis for dynamically adjusting the weight parameters in the next frame.

[0067] Optionally, the step of performing temporal domain filtering on the preliminary 3D normal data using the historical reconstructed normal map includes:

[0068] Calculate the difference between the preliminary 3D normal data and the historical reconstructed normal map at the corresponding pixel positions;

[0069] Based on the difference between the historical optimization requirement feedback map and the normal vector, the time filtering coefficients are adaptively determined;

[0070] The preliminary 3D normal data and the historical reconstructed normal map are weighted and fused using the time filtering coefficients to obtain temporally stable normal data.

[0071] Specifically, on a pixel-by-pixel basis, the difference between the normal vector in the preliminary 3D normal data of the current frame and the normal vector at the corresponding position in the historical reconstructed normal map is calculated. In practice, this difference is usually quantified by calculating the dot product of the two unit normal vectors; the closer the dot product value is to 1, the more consistent the two normal directions are, and the smaller the difference.

[0072] The crucial step now involves adaptively determining the temporal filtering coefficients. The calculation of these coefficients is influenced by two factors: the previously calculated difference in normal vectors and the feedback value from the historical optimization feedback map. The feedback value indicates areas with problematic normal quality from the previous frame; a higher feedback value indicates less reliable normals in that area, and their impact on the current frame should be reduced. Larger normal vector differences suggest potential changes in the scene, requiring a reduction in the weight of historical data to allow for faster updates of new normals. To digitize this logic, the temporal filtering coefficient for each pixel is calculated using the following formula. . In this formula, These are the final time filtering coefficients. This represents the preliminary 3D normal data generated by the vector fusion calculation module for the current frame. This represents the normal vector in the historical reconstruction normal map. It is the dot product of these two vectors. The angular differences between them were directly quantified. These are normalized feedback values ​​obtained from the historical optimization demand feedback graph. It is a basic filter coefficient, usually a small value, such as 0.1, used to provide basic stability in the absence of any anomalies. and These are two weighting parameters used to adjust the influence of normal difference and historical feedback on the filter coefficients, and their values ​​are usually between 0.2 and 0.6. The function constrains the calculation results to a closed interval between 0.0 and 1.0.

[0073] Using the calculated time filtering coefficients The preliminary 3D normal data and the historical reconstructed normal maps are weighted and fused to generate temporally stable normal data. The fusion operation is performed using linear interpolation, as shown in the following formula: ,in This is temporally stable normal data. After normalization, this vector will be used as input for subsequent spatial domain processing. This process ensures that within stable regions of the image, The value is small. More inheritance The stability; while in areas of image change or areas where there were problems in the previous frame. The value is relatively large. It can converge to faster The new state it represents.

[0074] For example, suppose that in the current frame rendering process, the initial 3D normal vector at a certain pixel position is... The normal vector at the corresponding position of the historical reconstructed normal map retrieved from the historical frame buffer is... First, the dot product of the current frame's normal and the historical frame's normal is calculated to quantify the difference in normal vectors. At this point, the difference term of the normal vector is Next, we proceed to adaptively determine the time filter coefficients. The step involves setting the basic filter coefficients. Adjust parameters and And assume that the normalized feedback value at this point is obtained from the historical optimization demand feedback map. Calculate the time filter coefficients. Since the result is within a closed interval from 0.0 to 1.0, The final value was 0.227967. Finally, the calculated temporal filtering coefficients were used to weight and fuse the two frames of data to generate temporally stable normal data. . The result is The output vector is the time-domain stable normal data after time-domain filtering, which effectively suppresses inter-frame flicker and preserves a reasonable motion trend.

[0075] Optionally, the reconstructed normal map further includes:

[0076] The reconstructed normal map is downsampled to generate a low-resolution normal layer;

[0077] The reconstructed normal map and the low-resolution normal layer are respectively subjected to detail enhancement and noise smoothing.

[0078] The processed low-resolution normal layer is upsampled and weighted together with the processed high-resolution normal layer to generate the final normal map for the lighting rendering.

[0079] Specifically, the reconstructed normal map is downsampled to generate a low-resolution normal layer. Typically, a box filter or Gaussian filter is used to convolve the original resolution reconstructed normal map, followed by dimensionality reduction sampling, for example, shrinking its size to 1 / 4 or 1 / 16 of its original size, thus obtaining one or more low-resolution normal layers. The essence of this operation is to extract low-frequency information from the normal map, namely, macroscopic, large-scale surface orientation variations.

[0080] The normal maps at different resolutions are processed in parallel but differentiated ways. For the reconstructed normal map at the original resolution, the focus is on detail enhancement. A sharpening algorithm, such as an unsharpening mask, is applied to highlight the fine structures in the texture. This is achieved by subtracting a lightly Gaussian blurred version from the original normal map and then adding the difference back to the original image proportionally. For the low-resolution normal map, the focus is on noise smoothing. A relatively stronger smoothing filter, such as a Gaussian filter with a larger kernel or a median filter, is applied to eliminate large blocks of noise or unnatural gradients that may occur during normal reconstruction.

[0081] The processed layers are then integrated to generate the final normal map. First, the low-resolution normal map layer, which has undergone noise smoothing, is upsampled, typically using bilinear or bicubic interpolation algorithms, to restore its resolution to match the original reconstructed normal map. Figure 1 Then, the upsampled low-resolution layer is weighted and composited with the high-resolution normal layer that has undergone detail enhancement. This compositing process can be represented by the following formula:

[0082] In this formula, It is the normal vector in the final normal map. These are high-resolution normal vectors that have undergone detail enhancement processing. It is a low-resolution normal vector after upsampling. and These are the weight coefficients corresponding to the high-resolution and low-resolution layers, respectively. They control the blending ratio between the two and typically satisfy the following conditions: Constraints. The function ensures that the synthesized vectors are restored to unit length to serve as valid normal vectors. The output of this step is a final normal map optimized at multiple scales, which will be directly used in subsequent lighting rendering stages to provide richer and more stable surface detail information.

[0083] For example, when performing multi-scale optimization on the reconstructed normal map, the system first uses a Gaussian filter to downsample the original reconstructed normal map. Assume the size of the original reconstructed normal map is... After downsampling, the generated size is reduced to the original size. The system first creates a low-resolution normal layer. Then, it performs differential processing on the two layers: applying an unsharpening mask to enhance details on the high-resolution layer, and applying a large-kernel Gaussian filter to smooth noise on the low-resolution layer. In the final weighted compositing stage, the system restores the smoothed low-resolution layer to its original resolution using bilinear interpolation upsampling and then blends it with the enhanced high-resolution layer. High-resolution weight coefficients are set. Low-resolution weighting coefficients If the high-resolution enhanced normal vector at a certain pixel location... Upsampled low-resolution smoothed normal vector Calculate the final normal vector. Calculate the magnitude of the vector. After normalization, the unit normal vector in the final normal map is obtained. This result effectively combines the macroscopic surface direction with the microscopic bump details for subsequent lighting rendering.

[0084] S7. Combining the obtained dynamic light source parameters, the original two-dimensional texture is rendered with lighting using the reconstructed normal map.

[0085] Optionally, the step of combining the acquired dynamic light source parameters and using the reconstructed normal map to perform lighting rendering on the original two-dimensional texture includes:

[0086] The diffuse illumination intensity and specular highlight intensity of each pixel are calculated based on the dynamic light source parameters and the reconstructed normal map.

[0087] The background color information of the original two-dimensional texture is obtained, and the background color information is superimposed and synthesized with the diffuse reflection light intensity and the specular highlight intensity to generate an output image with three-dimensional lighting effects.

[0088] Specifically, the fragment shader performs illumination intensity calculations for each pixel on the screen. It samples the surface normal vector corresponding to that pixel from the reconstructed normal map. Using the normalized illumination direction vector from the dynamic light source parameters, it calculates the dot product of the surface normal vector and the illumination direction vector, truncating negative values ​​to obtain the diffuse illumination intensity at that point. To calculate specular highlight intensity, a view direction vector is also needed. For 2D image rendering, this vector can usually be simplified to a fixed vector pointing out of the screen, such as (0,0,1). The half-angle vector of the illumination direction vector and the view direction is calculated, then the dot product of the half-angle vector and the surface normal vector is calculated, truncating negative values, and then the result is raised to the power of n. This power of n is the specular coefficient, controlling the size and sharpness of the highlight. Its value typically ranges from 8.0 to 256.0; the higher the value, the smoother the material appears. After calculating the intensity factors of diffuse reflection and specular highlight, the background color information of the pixel, i.e., the albedo color, is sampled from the original two-dimensional texture.

[0089] All illumination components are superimposed and synthesized. This synthesis process follows the standard Blinn-Phong illumination model, and its digital implementation is as follows: In this formula, It is the pixel color that is ultimately output to the screen. It is the background color information obtained from the original two-dimensional texture. It is the global ambient light color, a preset constant used to brighten dark areas. It refers to the color and intensity of dynamic light sources. It is the diffuse reflection light intensity factor obtained through calculation. It is the specular reflection color of the material, usually a preset monochrome value, such as white. It is the specular highlight intensity factor obtained through calculation. The output of this formula is the final image with rich three-dimensional lighting effects, which completes the lighting and texture reconstruction of the original two-dimensional texture.

[0090] For example, when performing lighting rendering using a reconstructed normal map in conjunction with dynamic light source parameters, the fragment shader first samples the surface normal vector of the current pixel from the reconstructed normal map. The unit normal vector of that pixel is then set. The normalized illumination direction vector provided by the dynamic light source parameters is (0.2, 0.1, 0.975). The values ​​are (0.3, 0.2, 0.933). The system calculates the dot product and truncates negative values ​​to obtain the diffuse reflectance intensity factor. for To calculate the intensity of specular highlights, the observation direction vector is set. If the value is (0.0, 0.0, 1.0), then the half-angle vector between the illumination direction and the viewing direction is... for Calculate the dot product and take the specular highlight factor raised to the power of 32 to obtain the specular highlight intensity factor. Background color information is obtained by sampling from the original 2D texture. Set the global ambient light color Dynamic light source color and intensity The material reflects colors like a mirror. Calculate the final output pixel color. The calculation result is output after color space mapping, achieving a composite effect of diffuse reflection and specular highlights with rich three-dimensional sensory experience.

[0091] Optionally, the method further includes:

[0092] Record the statistical characteristics of the optimization requirement feedback map generated under the directional parameters of different light source directions;

[0093] Based on the statistical characteristics and the expected change trend of the dynamic light source parameters, a light source direction adjustment strategy for the next moment is predicted and recommended.

[0094] Specifically, the core process involves maintaining a relational database or lookup table. After rendering a frame or a short time window under a specific light source direction, it first extracts statistical features from the optimization feedback map generated within that period. This statistical feature can be a composite indicator, such as calculating the average and variance of all pixel values ​​in the entire feedback map. A high average indicates poor overall reconstruction quality and widespread problems; a large variance indicates unstable quality and serious localized flaws. The direction parameter of the current light source direction, typically represented as a three-dimensional unit vector, is paired with the calculated statistical features of the optimization feedback map and stored as a data pair in the historical record. Over time, this accumulates a large number of data samples regarding different lighting angles and their corresponding reconstruction quality.

[0095] When a light source adjustment strategy needs to be recommended, it combines the expected change trend of dynamic light source parameters provided by the user or upper-layer application, such as the light source about to move from the left to the right, to query and analyze this historical database. The logic of prediction and recommendation is based on a core assumption: similar light source directions will produce similar reconstruction problems. Therefore, it analyzes the light source direction of each sampling point on the expected path and looks for adjacent directions in historical data. If a certain expected direction is found to have a high optimization demand feedback value in history, then that direction is considered a problem direction. The recommended adjustment strategy can take several forms. The most direct strategy is to fine-tune the movement path of the light source, suggesting bypassing known historical problem areas. For example, if it is found that when the light source shines from directly above, the normal reconstruction quality drops sharply due to overexposure of highlights, it can be recommended to slightly shift the light source path, such as by 5 to 10 degrees, to avoid this worst angle. Another strategy is to dynamically adjust other rendering parameters as compensation. For example, when approaching a problem lighting angle, an enhanced spatiotemporal joint optimization process can be triggered in advance, using stronger filtering coefficients to suppress expected jitter. The final output of this step is not image data, but a series of control signals or parameter suggestions, which are sent to the light source control module or the rendering pipeline configuration module to enable proactive intervention and optimization of the rendering process in the next moment.

[0096] For example, when recording the statistical characteristics of the light source direction and executing the light source adjustment strategy recommendation, the system first extracts statistical features from the optimization requirement feedback map generated in the current period. Assuming the current light source direction parameters, the system obtains the normalized feedback values ​​of all pixels in the entire feedback map. To evaluate the overall reconstruction quality, the system calculates the average of these feedback values. If the average is high, it indicates that the reconstruction quality is generally poor under the current illumination angle, and there are widespread recognition problems. Simultaneously, the system calculates the variance of the feedback values. The magnitude of the variance directly reflects the stability of the quality; a large variance means there are serious local defects in the image. The system pairs the three-dimensional unit vector of the current light source direction with the calculated average and variance, and stores this data in a historical record association database. When the upper-layer application predicts that a dynamic light source is about to move to a certain expected direction, the prediction module retrieves historical records adjacent to that expected direction from the database. If the retrieval finds that a sampling point on that expected path historically corresponds to a high average feedback value, the system will determine that direction as a high-risk area. At this point, the system automatically calculates an offset vector based on a strategy to avoid the worst angle and applies it to the expected path. By fine-tuning the light source's trajectory, it suggests that the light source bypass known quality degradation areas. In this way, the system achieves closed-loop protection of normal reconstruction accuracy and dynamic path optimization without affecting the overall visual effect.

[0097] Based on the same inventive concept, such as Figure 6 As shown, the present invention also provides a 2D normal reconstruction lighting system utilizing a multi-target rendering buffer, the system comprising:

[0098] The texture input and buffer management module is used to configure the multi-target rendering buffer and input the original 2D texture to be processed;

[0099] The parallel feature extraction module is used to extract the brightness feature map, gradient feature map and local structure confidence map of the original two-dimensional texture in parallel during a single rendering process.

[0100] The feature classification storage module is used to store the brightness feature map, the gradient feature map and the local structure confidence map in different attachments of the multi-target rendering buffer. The local structure confidence map is used to evaluate the ease with which each region in the original two-dimensional texture generates a reliable normal vector.

[0101] An adaptive weight decision module is used to generate a quality prediction map based on the local structure confidence map, and dynamically adjust the weight parameters of the brightness feature map and the gradient feature map in the vector fusion calculation according to the quality prediction map and the received optimization requirement feedback map.

[0102] The vector fusion calculation module is used to perform vector fusion calculation using the weight parameters, the direction parameters of the preset light source direction, the brightness feature map and the gradient feature map to generate preliminary three-dimensional normal data;

[0103] The spatiotemporal joint optimization module is used to perform spatiotemporal joint optimization processing on the preliminary three-dimensional normal data to obtain a reconstructed normal map.

[0104] The dynamic lighting rendering module is used to combine the acquired dynamic light source parameters and use the reconstructed normal map to perform lighting rendering on the original two-dimensional texture.

[0105] It should be noted that the electrical connections between the various units described above do not necessarily represent direct or indirect connections. Any indirect connection method can be applied to the embodiments of the present invention as long as it achieves the purpose of the present invention. The above descriptions are merely exemplary embodiments of the present invention and should not be construed as limiting the scope of the present invention.

[0106] All equivalent changes and modifications made in accordance with the teachings of this invention are still within the scope of this invention. Those skilled in the art will readily conceive of other embodiments of this invention upon considering the specification and the disclosure of practical truth. This application is intended to cover any variations, uses, or adaptations of this invention that follow the general principles of this invention and include common knowledge or conventional techniques in the art not described herein.

Claims

1. A 2D normal reconstruction lighting method utilizing a multi-target rendering buffer, characterized in that, The method includes: Configure a multi-target rendering buffer and input the original 2D texture to be processed; During a single rendering process, the brightness feature map, gradient feature map, and local structure confidence map of the original 2D texture are extracted in parallel. The local structure confidence map is obtained by: sampling the input original 2D texture once through the shader program of the graphics processor during a single rendering process, and using the parallel output characteristics of the multi-target rendering buffer to simultaneously obtain the brightness feature map, gradient feature map, and local structure confidence map. The local structure confidence map is a reference layer specifically used to quantitatively evaluate the difficulty of generating reliable normal vectors for each local region in the original 2D texture. The confidence is obtained by analyzing the continuity and complexity of local pixel features. When the texture features of a certain pixel region are clear and the direction is consistent, a higher confidence value is assigned to that location. If the features are too blurry or the noise is too great, a lower value is assigned. The brightness feature map, the gradient feature map, and the local structure confidence map are stored in different attachments of the multi-objective rendering buffer. The local structure confidence map is used to evaluate the ease with which each region in the original two-dimensional texture generates a reliable normal vector. A quality prediction map is generated based on the local structure confidence map. According to the quality prediction map and the received optimization requirement feedback map, the weight parameters of the brightness feature map and the gradient feature map in the vector fusion calculation are dynamically adjusted. This includes: identifying low-confidence regions marked in the quality prediction map and applying a first weight configuration to these low-confidence regions, whereby the first weight configuration increases the weight of the brightness feature map; identifying residual problem regions marked in the optimization requirement feedback map and applying a second weight configuration to these residual problem regions, whereby the second weight configuration increases the weight of the gradient feature map, or triggering a recalculation of the local gradient features of the residual problem regions. Vector fusion calculation is performed using the weight parameters, the direction parameters of the preset light source direction, the brightness feature map, and the gradient feature map to generate preliminary three-dimensional normal data; The initial 3D normal data undergoes spatiotemporal joint optimization processing to obtain a reconstructed normal map and an optimization requirement feedback map. This includes: acquiring historical reconstructed normal maps and historical optimization requirement feedback maps generated in the previous frame; using the historical reconstructed normal maps to perform temporal domain filtering on the initial 3D normal data to obtain temporally stable normal data, which is used to overcome flickering or jitter problems that may occur in the initial 3D normal data; performing spatial domain denoising and detail enhancement processing on the temporally stable normal data to obtain a reconstructed normal map; and analyzing the uncertainties of the temporally stable normal data in spatial domain processing to generate the optimization requirement feedback map for the current frame. Based on the acquired dynamic light source parameters, the original two-dimensional texture is rendered using the reconstructed normal map.

2. The 2D normal reconstruction lighting method using a multi-target rendering buffer according to claim 1, characterized in that, The step of performing temporal domain filtering on the preliminary 3D normal data using the historical reconstructed normal map includes: Calculate the difference between the preliminary 3D normal data and the historical reconstructed normal map at the corresponding pixel positions; Based on the difference between the historical optimization requirement feedback map and the normal vector, the time filtering coefficients are adaptively determined; The preliminary 3D normal data and the historical reconstructed normal map are weighted and fused using the time filtering coefficients to obtain temporally stable normal data.

3. The 2D normal reconstruction lighting method using a multi-target rendering buffer according to claim 1, characterized in that, The configuration of the multi-target rendering buffer and the input of the original 2D texture to be processed include: Perform basic initialization and attachment orientation configuration on the multi-target rendering buffer and adapt and bind it to the graphics rendering pipeline to make its resolution and color format match the original 2D texture and support parallel writing of multiple feature maps to storage. Load and validate the original 2D texture to be processed and unify its format. After completing pipeline input, sampling settings and spatial matching with the rendering buffer, input it into the configured multi-target rendering buffer.

4. The 2D normal reconstruction lighting method using a multi-target rendering buffer according to claim 1, characterized in that, The reconstructed normal map also includes: The reconstructed normal map is downsampled to generate a low-resolution normal layer; The reconstructed normal map and the low-resolution normal layer are respectively subjected to detail enhancement and noise smoothing. The processed low-resolution normal layer is upsampled and weighted together with the processed high-resolution normal layer to generate the final normal map for the lighting rendering.

5. The 2D normal reconstruction lighting method using a multi-target rendering buffer according to claim 1, characterized in that, The step of generating preliminary 3D normal data by performing vector fusion calculation using the weight parameters, the orientation parameters of the preset light source direction, the brightness feature map, and the gradient feature map includes: Each pixel value in the brightness feature map is converted into a virtual height field, which is used to simulate the height information of the object surface corresponding to the pixel value. The virtual height field, the gradient feature map, the direction parameter of the preset light source direction, and the weight parameter are fused and calculated to generate preliminary three-dimensional normal data.

6. The 2D normal reconstruction lighting method using a multi-target rendering buffer according to claim 1, characterized in that, The step of combining the acquired dynamic light source parameters and using the reconstructed normal map to perform lighting rendering on the original two-dimensional texture includes: The diffuse illumination intensity and specular highlight intensity of each pixel are calculated based on the dynamic light source parameters and the reconstructed normal map. The background color information of the original two-dimensional texture is obtained, and the background color information is superimposed and synthesized with the diffuse reflection light intensity and the specular highlight intensity to generate an output image with three-dimensional lighting effects.

7. A 2D normal reconstruction lighting method using a multi-target rendering buffer according to claim 1, characterized in that, The method further includes: Record the statistical characteristics of the optimization requirement feedback map generated under the directional parameters of different light source directions; Based on the statistical characteristics and the expected change trend of the dynamic light source parameters, a light source direction adjustment strategy for the next moment is predicted and recommended.

8. A 2D normal reconstruction lighting system utilizing a multi-objective rendering buffer, applied to the 2D normal reconstruction lighting method utilizing a multi-objective rendering buffer as described in any one of claims 1-7, characterized in that, The system includes: The texture input and buffer management module is used to configure the multi-target rendering buffer and input the original 2D texture to be processed; The parallel feature extraction module is used to extract the brightness feature map, gradient feature map, and local structure confidence map of the original 2D texture in parallel during a single rendering process. The local structure confidence map includes: during a single rendering process, the input original 2D texture is sampled once by the shader program of the graphics processor, and the brightness feature map, gradient feature map, and local structure confidence map are obtained simultaneously by utilizing the parallel output characteristics of the multi-target rendering buffer. The local structure confidence map is a reference layer specifically used to quantitatively evaluate the difficulty of generating reliable normal vectors for each local region in the original 2D texture. The confidence is obtained by analyzing the continuity and complexity of local pixel features. When the texture features of a certain pixel region are clear and the direction is consistent, a higher confidence value is assigned to that location. If the features are too blurry or the noise is too great, a lower value is assigned. The feature classification storage module is used to store the brightness feature map, the gradient feature map and the local structure confidence map in different attachments of the multi-target rendering buffer. The local structure confidence map is used to evaluate the ease with which each region in the original two-dimensional texture generates a reliable normal vector. An adaptive weight decision module is used to generate a quality prediction map based on the local structure confidence map, and dynamically adjust the weight parameters of the brightness feature map and the gradient feature map in vector fusion calculation according to the quality prediction map and the received optimization requirement feedback map. This includes: identifying low-confidence regions marked in the quality prediction map and applying a first weight configuration to the low-confidence regions, whereby the first weight configuration increases the weight of the brightness feature map; identifying residual problem regions marked in the optimization requirement feedback map and applying a second weight configuration to the residual problem regions, whereby the second weight configuration increases the weight of the gradient feature map, or triggering a recalculation of the local gradient features of the residual problem regions. The vector fusion calculation module is used to perform vector fusion calculation using the weight parameters, the direction parameters of the preset light source direction, the brightness feature map and the gradient feature map to generate preliminary three-dimensional normal data; The spatiotemporal joint optimization module is used to perform spatiotemporal joint optimization processing on the preliminary 3D normal data to obtain a reconstructed normal map and an optimization requirement feedback map. This includes: acquiring historical reconstructed normal maps and historical optimization requirement feedback maps generated in the previous frame; using the historical reconstructed normal maps to perform temporal domain filtering on the preliminary 3D normal data to obtain temporally stable normal data, which is used to overcome flickering or jitter problems that may occur in the preliminary 3D normal data; performing spatial domain denoising and detail enhancement processing on the temporally stable normal data to obtain a reconstructed normal map; and analyzing the uncertainties of the temporally stable normal data in spatial domain processing to generate the optimization requirement feedback map for the current frame. The dynamic lighting rendering module is used to combine the acquired dynamic light source parameters and use the reconstructed normal map to perform lighting rendering on the original two-dimensional texture.