Unity-based screenshot texture mixing method and device, medium and equipment
By acquiring the base RenderTexture of the target scene and the textures of UI elements, and utilizing GPU rendering and Shader processing, the problem of low performance in screenshots in Unity is solved, achieving high-performance texture blending and complex visual effects.
Patent Information
- Application Number
- CN202511136245.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-14
- Publication Date
- 2025-11-25
AI Technical Summary
Existing technologies struggle to achieve flexible and high-performance screenshots in Unity, especially when mixing 3D scenes with UI interfaces. Traditional methods are time-consuming, consume a lot of memory, and struggle to achieve complex visual effects such as overlay and blurring.
By obtaining the base RenderTexture of the target scene and the textures of UI elements, converting them into a format that meets the requirements of Shader processing, rendering them using the GPU, and using Shaders to achieve complex post-processing effects on the textures, including loading Shaders and creating Material instances, and using the Graphics.Blit method for parallel drawing.
It achieves high-performance texture blending, improving performance by more than 10 times, maintaining consistency between the scene and the UI, and can flexibly handle complex post-processing effects of images, such as overlay and blur.
Smart Images

Figure CN121010509A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Unity game development technology, and more specifically, to a screenshot texture blending method, apparatus, medium, and device based on Unity. Background Technology
[0002] In the field of game development, screenshotting is a fundamental and important technology, playing a crucial role in enhancing scene aesthetics and interactivity. Unity, as a mainstream game engine, provides basic screenshot functionality, but it lacks readily available APIs for handling screenshots from different nodes, mixing custom images, and custom processing effects.
[0003] Currently, the main methods for achieving highly flexible screenshots in Unity include: directly stitching the required image data onto the interface to generate screenshots entirely from the screen; adjusting the pixel data of Texture2D based on the required algorithm by using images rendered by multiple cameras; and achieving slightly more complex effects by attaching custom materials to the image or adding post-processing functions to the camera. However, all of these methods are relatively complex, difficult to debug, and have poor performance.
[0004] However, using Unity's built-in screenshot function makes it difficult to control the screenshot target. Setting up multiple Cameras and RenderTextures is complicated. Adding complex screenshots, such as custom images and text, is also difficult and time-consuming, which is unacceptable for high-performance applications. Furthermore, the complex post-processing of images requires high technical skills from developers.
[0005] For screenshots, traditional methods like Texture2D.GetPixels consume significant time and memory without achieving the desired results, especially when the target texture has complex layers and high resolution. When blending images from 3D scenes with those from the UI, traditional solutions using node visibility control and screenshot blending can disrupt the interface and cause complexities, making it difficult to achieve visual effects such as overlay and blurring. Furthermore, UI screenshots in traditional solutions often involve scaled images and text, meaning a direct screenshot can only capture the image quality at the device's resolution.
[0006] Therefore, providing a solution that flexibly integrates screenshots with UI interfaces and performs post-processing to meet the screenshot requirements of complex scenarios is a technical problem that needs to be solved in this field. Summary of the Invention
[0007] The purpose of this application is to provide a screenshot texture blending method, apparatus, medium and device based on Unity, which utilizes the powerful parallel computing capabilities of the GPU to achieve a high-performance texture blending scheme, keeping the scene and UI interface with minimal or no changes, and using a shader that is easy to process images to complete complex post-processing effects of textures, thus maintaining the consistency of scene screenshots while achieving high performance.
[0008] To achieve the above objectives, the embodiments of this application are implemented in the following manner: In a first aspect, embodiments of this application provide a screenshot texture blending method based on Unity, comprising: obtaining a screenshot texture blending request; based on the screenshot texture blending request, obtaining a basic RenderTexture and UI element textures corresponding to the target scene, and converting the basic RenderTexture into a target format, wherein the basic RenderTexture does not contain UI elements, and the target format is a format that conforms to the requirements of Shader processing; loading the Shader and creating a Material instance, and then assigning the basic RenderTexture and UI element textures as attribute values to the Material instance; creating a final RenderTexture, and based on the Material instance and the final RenderTexture, calling the GPU to perform rendering, obtaining the rendered final RenderTexture and outputting it.
[0009] In conjunction with the first aspect, in the first possible implementation of the first aspect, based on the screenshot texture blending request, the basic RenderTexture and UI element texture corresponding to the target scene are obtained, including: based on the screenshot texture blending request, obtaining the camera view under the target scene, after closing the UI, calling Unity's screenshot API to capture the scene screen and obtain the basic RenderTexture; determining each UI element under the target scene, and obtaining the UI element texture of each UI element.
[0010] In conjunction with the first possible implementation of the first aspect, in the second possible implementation of the first aspect, obtaining the UI element texture of each UI element includes: for the Image element in the UI elements: obtaining the texture resource corresponding to the Image element as the UI element texture of the Image element; for the Text element in the UI elements: obtaining the font texture based on the font material corresponding to the Text element, obtaining the text vertex attribute of the Text element through TextGenerator, and generating the UI element texture of the Text element based on the font texture and the text vertex attribute of the Text element.
[0011] In conjunction with the first possible implementation of the first aspect, in the third possible implementation of the first aspect, the Shader is loaded and a Material instance is created, and then the base RenderTexture and UI element texture are assigned as attribute values to the Material instance, including: obtaining a predefined or dynamically loaded Shader; creating a Material instance and using the selected Shader; and assigning the base RenderTexture and UI element texture as attribute values to the Material.
[0012] In conjunction with the first aspect, in the fourth possible implementation of the first aspect, the GPU is invoked for rendering based on the Material instance and the final RenderTexture, including: using the base RenderTexture as the source texture and the final RenderTexture as the target texture; and using the Graphics.Blit method to draw pixels onto the target texture using the source texture and the Material instance.
[0013] Combining the fourth possible implementation of the first aspect, in the fifth possible implementation of the first aspect, pixels are drawn to the target texture using the Graphics.Blit method with the source texture and Material instance. This includes: initiating a drawing command through the Graphics.Blit method; after the Unity engine receives the drawing command, the GPU starts full-screen drawing; executing the fragment shader code in the Shader bound to the Material instance once for each pixel of the target texture, calculating the final color value of each pixel using the base RenderTexture in the Material instance and the UI element texture through the Shader, and writing it to the corresponding pixel position of the target texture.
[0014] In conjunction with the first aspect, in the sixth possible implementation of the first aspect, the target format is PNG format.
[0015] Secondly, embodiments of this application provide a screenshot texture blending device based on Unity, comprising: a request acquisition unit for acquiring a screenshot texture blending request; a texture acquisition unit for acquiring a basic RenderTexture and UI element textures corresponding to a target scene based on the screenshot texture blending request, and converting the basic RenderTexture into a target format, wherein the basic RenderTexture does not contain UI elements, and the target format is a format that conforms to the requirements of Shader processing; a material creation unit for loading a Shader and creating a Material instance, and then assigning the basic RenderTexture and UI element textures as attribute values to the Material instance; and a rendering output unit for creating a final RenderTexture, and based on the Material instance and the final RenderTexture, calling the GPU to perform rendering, obtaining the rendered final RenderTexture and outputting it.
[0016] Thirdly, embodiments of this application provide a storage medium disposed within an electronic device, comprising a stored program, wherein, when the program is executed, it controls the electronic device containing the storage medium to execute the screenshot texture blending method based on Unity as described in the first aspect or any possible implementation thereof.
[0017] Fourthly, embodiments of this application provide an electronic device, including a memory and a processor. The memory is used to store information including program instructions, and the processor is used to control the execution of the program instructions. When the program instructions are loaded and executed by the processor, they implement the steps of the Unity-based screenshot texture blending method described in the first aspect or any of the possible implementations of the first aspect.
[0018] Beneficial effects: This solution obtains the base RenderTexture (excluding UI elements) and UI element textures corresponding to the target scene by acquiring the screenshot texture blending request, and converts the base RenderTexture to the target format (a format that meets the requirements of Shader processing, such as PNG format); by loading the Shader (which can be pre-set or dynamically loaded) and creating a Material instance, the base RenderTexture and UI element textures are assigned as attribute values to the Material instance; a final RenderTexture (with the same size as the base RenderTexture) is created, and the GPU is invoked to render using the Material instance and the final RenderTexture (the drawing command is initiated through the Graphics.Blit method. After the Unity engine receives the drawing command, the GPU starts full-screen drawing: the fragment shader code in the Shader bound to the Material instance is executed once for each pixel of the target texture, and the final color value of each pixel is calculated by the Shader using the base RenderTexture and UI element textures in the Material instance, and written to the corresponding pixel position of the target texture), and the rendered final RenderTexture is obtained and output. This solution utilizes GPU-based texture blending in screenshot scenarios, employing shaders for parallel blending to achieve a performance improvement of over 10 times, resulting in high-performance texture blending. Furthermore, this solution minimizes or eliminates changes to the scene and UI, using image-friendly shaders to handle complex post-processing effects. Texture blending is directly handled in C# scripts, and shaders are used to implement visual effects such as image overlay and blurring, offering greater flexibility while maintaining consistency in scene screenshots and achieving high performance.
[0019] The main challenge in implementing this solution lies in acquiring UI element textures. This solution employs differentiated methods for obtaining UI element textures. For Image elements, the corresponding texture resource can be directly obtained as the UI element texture. For Text elements, the font texture is obtained based on the font material, and the text vertex attributes are obtained through TextGenerator. Based on the font texture and the text vertex attributes, the UI element texture is generated. For static resource-type Image elements, their textures are directly extracted for lossless transmission. For dynamic and complex Text elements, an innovative approach combines font atlases (i.e., basic glyph resources) with real-time calculated text grid data (such as layout and style information). Through GPU rasterization, independent textures with fidelity completely consistent with the screen display can be dynamically baked, completely solving the texturing challenges of dynamic text, rich text, and special effects. While ensuring visual fidelity, it provides standardized input for subsequent GPU mixing.
[0020] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0021] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 A flowchart of a Unity-based screenshot texture blending method provided in an embodiment of this application.
[0023] Figure 2 This is a block diagram of a Unity-based screenshot texture blending device.
[0024] Icons: 10 - Unity-based screenshot texture blending device; 11 - Request fetch unit; 12 - Texture fetch unit; 13 - Material creation unit; 14 - Render output unit. Detailed Implementation
[0025] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.
[0026] Please see Figure 1 , Figure 1This is a flowchart illustrating a Unity-based screenshot texture blending method provided in an embodiment of this application. The Unity-based screenshot texture blending method is applied to an electronic device (the electronic device carries a client, and the client contains a game module developed based on Unity), and may include steps S10, S20, S30, and S40.
[0027] When a user needs to take a screenshot, they can initiate a screenshot request within the client via an electronic device (e.g., by selecting the screenshot option). At this point, the electronic device can proceed to step S10.
[0028] Step S10: Obtain screenshot texture blending request.
[0029] In this embodiment, the electronic device can obtain a screenshot texture blending request, i.e., a screenshot request.
[0030] After obtaining the screenshot texture blending request, the electronic device can proceed to step S20.
[0031] Step S20: Based on the screenshot texture blending request, obtain the base RenderTexture and UI element textures corresponding to the target scene, and convert the base RenderTexture into the target format. The base RenderTexture does not contain UI elements, and the target format is a format that meets the requirements of Shader processing.
[0032] In this embodiment, the electronic device can obtain the camera view of the target scene (the scene corresponding to the screenshot texture blending request) based on the screenshot texture blending request. After turning off the UI (and removing some 3D objects as needed, such as assigning some labels to 3D objects, 3D objects with labels can be kept in the scene when taking screenshots, while 3D objects without labels are excluded), it calls Unity's screenshot API (such as ScreenCapture.CaptureScreenshotAsTexture) to capture the scene image and obtain the basic RenderTexture. The basic RenderTexture can be understood as the background texture, which does not contain UI elements.
[0033] After obtaining the base RenderTexture, the electronic device needs to convert the base RenderTexture into a target format that meets the requirements of Shader processing, such as PNG format, which can be achieved through TextureFormat.ARGB32 or Texture2D.ReadPixels.
[0034] Furthermore, the electronic device can identify each UI element in the target scene and acquire the UI element texture of each UI element. Acquiring the UI element texture is a technical challenge. This embodiment cleverly designs a UI element texture acquisition scheme that, while ensuring visual fidelity, can provide standardized input for subsequent GPU mixing.
[0035] For example, for the Image element in the UI interface: the electronic device can directly obtain the texture resource corresponding to the Image element as the UI interface element texture of the Image element.
[0036] For the Text element in the UI interface: electronic devices can obtain the font texture based on the font material corresponding to the Text element, obtain the text vertex property of the Text element through TextGenerator, and then generate the UI interface element texture of the Text element based on the font texture and the text vertex property of the Text element.
[0037] For static Image elements, their textures are directly extracted to achieve lossless transmission. For dynamic and complex Text elements, the system innovatively combines font atlases (i.e., basic glyph resources, font textures obtained through font materials) with real-time calculated text mesh data (such as layout and style information, i.e., text vertex attributes of Text elements obtained through TextGenerator). Through GPU rasterization, independent textures with fidelity completely consistent with the screen display can be dynamically baked, completely solving the texturing problem of dynamic text, rich text, and special effects.
[0038] After obtaining the basic RenderTexture and UI element textures, the electronic device can proceed to step S30.
[0039] Step S30: Load the Shader and create a Material instance, then assign the base RenderTexture and UI element textures as attribute values to the Material instance.
[0040] In this embodiment, the electronic device can obtain a predefined or dynamically loaded shader, create a Material instance, and use the selected shader; and assign the base RenderTexture and UI element textures as attribute values to the Material.
[0041] Shaders are used to define texture overlay, blending, blurring effects, etc. Shaders can be predefined (i.e., there are corresponding predefined shaders for each target scene) or dynamically loaded. For example, when a user submits a screenshot request, the selected screenshot options can be dynamically generated to improve the richness and flexibility of the screenshot function.
[0042] After the shader is loaded, the electronic device can create a Material instance (i.e., a material instance), use the loaded shader, and assign the base RenderTexture and UI element textures as attribute values to the Material. The shader is also bound to this Material for subsequent GPU rendering processes.
[0043] At this point, the electronic device can proceed to step S40.
[0044] Step S40: Create the final RenderTexture, and based on the Material instance and the final RenderTexture, call the GPU to render, obtain the rendered final RenderTexture and output it.
[0045] In this embodiment, the electronic device can create a final RenderTexture, the size of which is the same as the size of the base RenderTexture. The final RenderTexture can be understood as a blank container, a "blank canvas" for storing texture blending results. Then, using the base RenderTexture as the source texture and the final RenderTexture as the target texture, the Graphics.Blit method is used to trigger the GPU's drawing process (requiring both the source and target textures as input). Pixels are drawn onto the target texture using the source texture and the Material instance, thus achieving screenshot texture blending.
[0046] For example, a drawing command can be initiated using the `Graphics.Blit` method (this drawing command is equivalent to "Please use the shader rules defined in the material to draw the base RenderTexture onto the final RenderTexture"). Upon receiving the drawing command, the Unity engine's GPU can initiate full-screen rendering: for each pixel of the target texture, the fragment shader code in the shader bound to the Material instance is executed once. The shader uses the base RenderTexture in the Material instance and the UI element textures to calculate the final color value of each pixel and writes it to the corresponding pixel position on the target texture. Calculations for different pixels can be performed in parallel, greatly improving rendering efficiency. Finally, after all pixels have been drawn, the rendered final RenderTexture is obtained, allowing the output of a blended screenshot to fulfill the user's screenshot request.
[0047] By obtaining a screenshot texture blending request, the system acquires the base RenderTexture (excluding UI elements) and UI element textures corresponding to the target scene, and converts the base RenderTexture to the target format (a format that meets the requirements of the Shader, such as PNG). It loads the Shader (which can be pre-set or dynamically loaded) and creates a Material instance, then assigns the base RenderTexture and UI element textures as attribute values to the Material instance. Finally, it creates a final RenderTexture (with the same size as the base RenderTexture), and uses the Material instance and the final RenderTexture to call the GPU for rendering (by initiating a drawing command through the Graphics.Blit method; after receiving the drawing command, the Unity engine initiates full-screen rendering: executing the fragment shader code in the Shader bound to the Material instance once for each pixel of the target texture; calculating the final color value of each pixel using the base RenderTexture and UI element textures in the Material instance, and writing it to the corresponding pixel position of the target texture), obtaining the rendered final RenderTexture and outputting it. This solution utilizes GPU-based texture blending in screenshot scenarios, employing shaders for parallel blending to achieve a performance improvement of over 10 times, resulting in high-performance texture blending. Furthermore, this solution minimizes or eliminates changes to the scene and UI, using image-friendly shaders to handle complex post-processing effects. Texture blending is directly handled in C# scripts, and shaders are used to implement visual effects such as image overlay and blurring, offering greater flexibility while maintaining consistency in scene screenshots and achieving high performance.
[0048] Please see Figure 2 Based on the same inventive concept, this application also provides a Unity-based screenshot texture blending device 10, comprising: Request acquisition unit 11 is used to acquire screenshot texture blending requests.
[0049] The texture acquisition unit 12 is used to acquire the basic RenderTexture and UI element textures corresponding to the target scene based on the screenshot texture blending request, and convert the basic RenderTexture into the target format. The basic RenderTexture does not contain UI elements, and the target format is a format that meets the requirements of Shader processing.
[0050] Material creation unit 13 is used to load the Shader and create a Material instance, and then assign the basic RenderTexture and UI element textures as attribute values to the Material instance.
[0051] The rendering output unit 14 is used to create the final RenderTexture, and based on the Material instance and the final RenderTexture, calls the GPU to perform rendering, obtains the rendered final RenderTexture, and outputs it.
[0052] In this embodiment, the texture acquisition unit 12 is used to: acquire the camera view of the target scene based on the screenshot texture blending request, and after closing the UI, call Unity's screenshot API to capture the scene screen to obtain the basic RenderTexture; determine each UI interface element in the target scene, and acquire the UI interface element texture of each UI interface element.
[0053] In this embodiment, the texture acquisition unit 12 is used to: for Image elements in the UI interface elements: acquire the texture resource corresponding to the Image element as the UI interface element texture of the Image element; for Text elements in the UI interface elements: acquire the font texture based on the font material corresponding to the Text element, acquire the text vertex attribute of the Text element through TextGenerator, and generate the UI interface element texture of the Text element based on the font texture and the text vertex attribute of the Text element.
[0054] In this embodiment, the material creation unit 13 is used to: obtain a predefined or dynamically loaded Shader; create a Material instance and use the selected Shader; and assign the base RenderTexture and UI element textures as attribute values to the Material.
[0055] In this embodiment, the rendering output unit 14 is used to: use the base RenderTexture as the source texture and the final RenderTexture as the target texture; and draw pixels onto the target texture using the Graphics.Blit method, utilizing the source texture and the Material instance.
[0056] In this embodiment, the rendering output unit 14 is used to: initiate a drawing command through the Graphics.Blit method; after the Unity engine receives the drawing command, the GPU starts full-screen drawing: execute the fragment shader code in the Shader bound to the Material instance once for each pixel of the target texture, calculate the final color value of each pixel through the Shader using the basic RenderTexture in the Material instance and the UI element texture, and write it to the corresponding pixel position of the target texture.
[0057] This application provides a storage medium disposed within an electronic device, comprising a stored program, wherein the program, when running, controls the electronic device containing the storage medium to execute the Unity-based screenshot texture blending method of this embodiment.
[0058] Furthermore, this application provides an electronic device including a memory and a processor. The memory is used to store information including program instructions, and the processor is used to control the execution of the program instructions. When the program instructions are loaded and executed by the processor, the steps of the screenshot texture blending method based on Unity in this embodiment are implemented.
[0059] In summary, this application provides a screenshot texture blending method, apparatus, medium, and device based on Unity. By obtaining a screenshot texture blending request, the basic RenderTexture (excluding UI elements) and UI element textures corresponding to the target scene are obtained, and the basic RenderTexture is converted to a target format (a format that meets the requirements of Shader processing, such as PNG). A Shader is loaded (either pre-set or dynamically loaded) and a Material instance is created. The basic RenderTexture and UI element textures are then assigned as attribute values to the Material instance. A final RenderTexture (with the same size as the basic RenderTexture) is created. Using the Material instance and the final RenderTexture, the GPU is invoked for rendering (a drawing command is initiated via the Graphics.Blit method; after receiving the drawing command, the Unity engine initiates full-screen rendering: the fragment shader code in the Shader bound to the Material instance is executed once for each pixel of the target texture; the Shader calculates the final color value of each pixel using the basic RenderTexture and UI element textures in the Material instance, and writes it to the corresponding pixel position of the target texture). The rendered final RenderTexture is then obtained and output. This solution utilizes GPU-based texture blending in screenshot scenarios, employing shaders for parallel blending to achieve a performance improvement of over 10 times, resulting in high-performance texture blending. Furthermore, this solution minimizes or eliminates changes to the scene and UI, using image-friendly shaders to handle complex post-processing effects. Texture blending is directly handled in C# scripts, and shaders are used to implement visual effects such as image overlay and blurring, offering greater flexibility while maintaining consistency in scene screenshots and achieving high performance.
[0060] In this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between these entities or operations.
[0061] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A screenshot texture blending method based on Unity, characterized in that, include: Get screenshot texture blending request; Based on the screenshot texture blending request, obtain the base RenderTexture and UI element textures corresponding to the target scene, and convert the base RenderTexture into the target format. The base RenderTexture does not contain UI elements, and the target format is a format that meets the requirements of Shader processing. Load the Shader and create a Material instance, then assign the base RenderTexture and UI element textures as property values to the Material instance; Create the final RenderTexture, and based on the Material instance and the final RenderTexture, call the GPU to render, obtain the rendered final RenderTexture, and output it.
2. The screenshot texture blending method based on Unity according to claim 1, characterized in that, Based on the screenshot texture blending request, obtain the basic RenderTexture and UI element textures corresponding to the target scene, including: Based on the screenshot texture blending request, obtain the camera view of the target scene, close the UI, call Unity's screenshot API to capture the scene image, and obtain the basic RenderTexture; Identify each UI element in the target scene and obtain the UI element texture for each UI element.
3. The screenshot texture blending method based on Unity according to claim 2, characterized in that, Retrieve the UI element texture for each UI element, including: For Image elements in the UI: obtain the texture resource corresponding to the Image element and use it as the UI element texture of the Image element; For the Text element in the UI: obtain the font texture based on the font material corresponding to the Text element, obtain the text vertex property of the Text element through TextGenerator, and generate the UI element texture of the Text element based on the font texture and the text vertex property of the Text element.
4. The screenshot texture blending method based on Unity according to claim 2, characterized in that, Load the shader and create a Material instance, then assign the base RenderTexture and UI element textures as property values to the Material instance, including: Get predefined or dynamically loaded shaders; Create a Material instance and use the selected shader; Assign the base RenderTexture and UI element textures as property values to Material.
5. The screenshot texture blending method based on Unity according to claim 1, characterized in that, Based on the Material instance and the final RenderTexture, the GPU is invoked for rendering, including: Use the base RenderTexture as the source texture and the final RenderTexture as the target texture; The Graphics.Blit method draws pixels onto the target texture using the source texture and a Material instance.
6. The screenshot texture blending method based on Unity according to claim 5, characterized in that, The `Graphics.Blit` method draws pixels onto a target texture using the source texture and a `Material` instance, including: Initiate drawing commands using the Graphics.Blit method; After the Unity engine receives the drawing command, the GPU starts full-screen drawing: for each pixel of the target texture, the fragment shader code in the shader bound to the Material instance is executed once. The shader uses the base RenderTexture in the Material instance and the UI element texture to calculate the final color value of each pixel and write it to the corresponding pixel position of the target texture.
7. The screenshot texture blending method based on Unity according to claim 1, characterized in that, The target format is PNG.
8. A screenshot texture blending device based on Unity, characterized in that, include: The request retrieval unit is used to retrieve screenshot texture blending requests; The texture acquisition unit is used to acquire the base RenderTexture and UI element textures corresponding to the target scene based on the screenshot texture blending request, and convert the base RenderTexture into the target format. The base RenderTexture does not contain UI elements, and the target format is a format that meets the requirements of Shader processing. The material creation unit is used to load the shader and create a Material instance, and then assign the basic RenderTexture and UI element textures as attribute values to the Material instance; The rendering output unit is used to create the final RenderTexture, and based on the Material instance and the final RenderTexture, calls the GPU to perform rendering, obtains the rendered final RenderTexture, and outputs it.
9. A storage medium, characterized in that, The storage medium is disposed within an electronic device and includes a stored program, wherein, when the program is executed, it controls the electronic device containing the storage medium to execute the screenshot texture blending method based on any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, the memory for storing information including program instructions, and the processor for controlling the execution of the program instructions, characterized in that: When the program instructions are loaded and executed by the processor, they implement the steps of the Unity-based screenshot texture blending method as described in any one of claims 1 to 7.