A method, system, device, and medium for processing game screens

By creating a new RenderTexture texture in the Unity engine, pixelating and water body resolution adjustments are solved, and the problem of taking into account both visual effects and real-time in game rendering is achieved, and efficient rendering effects are achieved.

CN119113521BActive Publication Date: 2025-07-25HANGZHOU ELECTRONICS SOUL NETWORK TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411079036.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-07
Publication Date
2025-07-25
Estimated Expiration
2044-08-07

AI Technical Summary

Technical Problem

The prior art is difficult to take into account the visual effects and real-time nature of game screen rendering, and traditional pixelation methods are difficult to achieve pixelation of complex objects, and the calculation overhead of water rendering is high.

Method used

Create a new RenderTexture texture through the Unity engine, pixelate specific objects and adjust the resolution of water bodies, and render and color them in combination with screen coordinates.

Benefits of technology

The combination of pixelation and non-pixelation in game screens is realized, which improves visual effects, reduces the amount of shaders to improve rendering real-time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119113521B_ABST
    Figure CN119113521B_ABST
Patent Text Reader

Abstract

The present application relates to a method, system, device and medium for processing game screens. The method includes: based on the pixelization requirement of a specific object, creating a corresponding first RenderTexture texture through the Unity engine to pixelize the specific object; based on the resolution adjustment requirement of the game water body, creating a corresponding second RenderTexture texture through the Unity engine to adjust the resolution of the game water body; and rendering and coloring the game screen on the screen based on the screen coordinates and the first and second RenderTexture textures. Through the present application, pixelized rendering of specific objects is achieved. The combination of pixelization and non-pixelization in the game screen improves the visual effect of the screen, and the resolution adjustment of the water body rendering effectively reduces the computational amount of the shader and improves the rendering real-time performance, solving the problem of how to balance the visual effect and real-time performance of game screen rendering.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer graphics technology, and particularly to a method, system, device, and medium for processing game screens. Background Art

[0002] Pixelization is a common art style in game development, which can bring unique visual effects to the game. Traditional pixelization methods usually pixelize all objects in the early stage of game development. For example, texture pixelization using shaders can only perform pixelization on objects with regular textures. Its representative is the pixelization of pure blocks in the game "Minecraft", and it is difficult to achieve pixelization of complex polygonal characters in this way. In addition, post-processing is used for pixelization, but it is difficult to pixelize a specified object alone when using post-processing for screen pixelization. On the other hand, water bodies are one of the important scene elements in games. A realistic water body effect can enhance the visual effect of the game, but at the same time, it also brings huge computational overhead.

[0003] Currently, no effective solution has been proposed for the problem of how to balance the visual effect and real-time performance of game screen rendering in related technologies. Summary of the Invention

[0004] Embodiments of this application provide a method, system, device, and medium for processing game screens to at least solve the problem of how to balance the visual effect and real-time performance of game screen rendering in related technologies.

[0005] In a first aspect, embodiments of this application provide a method for processing a game screen, and the method includes:

[0006] Based on the pixelization requirement of a specific object, a corresponding first RenderTexture texture is newly created through the Unity engine, where the first RenderTexture texture is used to pixelize the specific object in game screen rendering;

[0007] Based on the resolution adjustment requirement of the game water body, a corresponding second RenderTexture texture is newly created through the Unity engine, where the second RenderTexture texture is used to adjust the resolution of the game water body in game screen rendering;

[0008] Based on the screen coordinates of the specific object and the first RenderTexture texture, and the screen coordinates of the game water body and the second RenderTexture texture, the game screen in the screen is rendered and shaded through the Unity engine.

[0009] In some of these embodiments, before creating the corresponding first RenderTexture texture through the Unity engine based on the pixelation requirements of a specific object, the method includes:

[0010] Detect the shader of the specific object to obtain the rendering type of the specific object, where the rendering type includes opaque rendering, translucent rendering, and transparent rendering.

[0011] In some of these embodiments, creating the corresponding first RenderTexture texture through the Unity engine based on the pixelation requirements of a specific object includes:

[0012] If the specific object needs to be rendered opaquely, then in the BeforeForwardOpaque rendering stage of the Unity engine, based on the pixelation requirements of the specific object, create the corresponding first RenderTexture texture through the Unity engine;

[0013] If the specific object needs to be rendered semi-transparently, then in the BeforeForwardAlpha rendering stage of the Unity engine, based on the pixelation requirements of the specific object, create the corresponding first RenderTexture texture through the Unity engine.

[0014] In some of these embodiments, rendering and shading the in-game screen through the Unity engine based on the screen coordinates of the specific object and the first RenderTexture texture includes:

[0015] If the specific object needs to be rendered opaquely, then in the RenderForwardOpaque rendering stage of the Unity engine, render and shade the in-game screen through the Unity engine based on the screen coordinates of the specific object and the first RenderTexture texture.

[0016] In some of these embodiments, rendering and shading the in-game screen through the Unity engine based on the screen coordinates of the specific object and the first RenderTexture texture includes:

[0017] If the specific object needs to be rendered semi-transparently, then in the RenderForwardAlpha rendering stage of the Unity engine, render and shade the in-game screen through the Unity engine based on the screen coordinates of the specific object and the first RenderTexture texture.

[0018] In some embodiments, based on the resolution adjustment requirement for the game water body, creating a corresponding second RenderTexture texture through the Unity engine includes:

[0019] The rendering type of the game water body is semi-transparent rendering. In the BeforeForwardAlpha rendering stage of the Unity engine, based on the resolution adjustment requirement of the game water body, a corresponding second RenderTexture texture is newly created through the Unity engine, wherein the resolution adjustment requirement is to make the resolution of the game water body lower than the screen resolution.

[0020] In some embodiments, based on the screen coordinates of the game water body and the second RenderTexture texture, rendering and coloring the game screen on the screen through the Unity engine includes:

[0021] In the RenderForwardAlpha rendering stage of the Unity engine, the Unity engine is used to render and color the game screen on the screen based on the screen coordinates of the game water body and the second RenderTexture texture.

[0022] In a second aspect, an embodiment of the present application provides a system for processing a game screen, the system being used to execute the method described in any one of the first aspects above, the system comprising a pixelation module, a resolution adjustment module, and a rendering and shading module;

[0023] The pixelation module is used to create a corresponding first RenderTexture texture through the Unity engine according to the pixelation requirement for the specific object, wherein the first RenderTexture texture is used to pixelate the specific object in the game screen rendering;

[0024] The resolution adjustment module is used to create a corresponding second RenderTexture texture through the Unity engine according to the resolution adjustment requirements for the game water body, wherein the second RenderTexture texture is used to adjust the resolution of the game water body in the game screen rendering;

[0025] The rendering and shading module is used to render and shade the game screen on the screen through the Unity engine according to the screen coordinates of the specific object and the first RenderTexture texture, as well as the screen coordinates of the game water body and the second RenderTexture texture.

[0026] In a third aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the method described in the first aspect above is implemented.

[0027] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the method described in the first aspect above is implemented.

[0028] Compared with the related art, an embodiment of the present application provides a method, a system, a device, and a medium for processing a game screen. Among them, the method is based on the pixelization requirement of a specific object, and a corresponding first RenderTexture texture is created through the Unity engine. The first RenderTexture texture is used to pixelize the specific object during the game screen rendering; based on the resolution adjustment requirement of the game water body, a corresponding second RenderTexture texture is created through the Unity engine. The second RenderTexture texture is used to adjust the resolution of the game water body during the game screen rendering; based on the screen coordinates of the specific object and the first RenderTexture texture, as well as the screen coordinates of the game water body and the second RenderTexture texture, the game screen in the screen is rendered and shaded through the Unity engine, realizing the pixelized rendering of the specific object, achieving the combination of pixelization and non-pixelization in the game screen, improving the visual effect of the screen, and the resolution adjustment of the water body rendering can effectively reduce the calculation amount of the shader and improve the rendering real-time performance, solving the problem of how to balance the visual effect and real-time performance of the game screen rendering. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The schematic embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation to the present application. In the drawings:

[0030] Figure 1 is a flowchart of the steps of the game screen processing method according to an embodiment of the present application;

[0031] Figure 2 is a schematic flow of the pixelization of a specific object according to an embodiment of the present application Figure 1 ;

[0032] Figure 3 is a schematic flow of the pixelization of a specific object according to an embodiment of the present application Figure 2 ;

[0033] Figure 4It is a schematic flowchart of game water body resolution adjustment according to an embodiment of the present application;

[0034] Figure 5 It is a block diagram of the structure of a game screen processing system according to an embodiment of the present application;

[0035] Figure 6 It is a schematic internal structure diagram of an electronic device according to an embodiment of the present application. Detailed implementation manners

[0036] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be described and explained below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments provided in the present application without creative efforts fall within the scope of protection of the present application.

[0037] Obviously, the accompanying drawings in the following description are only some examples or embodiments of the present application. For those of ordinary skill in the art, the present application can also be applied to other similar scenarios based on these drawings without creative efforts. In addition, it can also be understood that although the efforts made in this development process may be complex and lengthy, for those of ordinary skill in the art related to the content disclosed in the present application, some design, manufacturing or production changes based on the technical content disclosed in the present application are only conventional technical means and should not be understood as the content disclosed in the present application being insufficient.

[0038] Referring to "embodiments" in the present application means that the specific features, structures or characteristics described in connection with the embodiments can be included in at least one embodiment of the present application. The phrase appears in various positions in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those of ordinary skill in the art explicitly and implicitly understand that the embodiments described in the present application can be combined with other embodiments without conflict.

[0039] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the ordinary meanings understood by those with ordinary skills in the technical field to which this application belongs. The words such as "a", "an", "one kind", "the" and the like involved in this application do not indicate a quantity limitation and may represent a singular or plural number. The terms "including", "comprising", "having" and any variations thereof involved in this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or modules (units) is not limited to the listed steps or units, but may further include steps or units not listed, or may further include other steps or units inherent to these processes, methods, products or devices. The words such as "connected", "linked", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "plurality" involved in this application means two or more. "And / or" describes the association relationship of associated objects and indicates that three relationships may exist. For example, "A and / or B" may represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the front and back associated objects. The terms "first", "second", "third" and the like involved in this application are only used to distinguish similar objects and do not represent a specific sorting of the objects.

[0040] An embodiment of this application provides a method for processing a game screen. Figure 1 It is a flowchart of the steps of the game screen processing method according to the embodiment of this application, as Figure 1 shown, and this method includes the following steps:

[0041] Step S102, based on the pixelization requirement of a specific object, create a corresponding first RenderTexture texture through the Unity engine, where the first RenderTexture texture is used to pixelize the specific object in the game screen rendering;

[0042] It should be noted that RenderTexture is a special texture type in the Unity engine. It allows the rendering result to be captured onto a texture instead of being directly rendered to the screen as usual. In other words, RenderTexture is a texture stored in the GPU memory and can be used as the target of a Frame Buffer Object to capture the rendering result.

[0043] Before step S102, this method further includes step S101, detecting the shader of the specific object to obtain the rendering type of the specific object, where the rendering type includes opaque rendering, semi-transparent rendering, and transparent rendering.

[0044] It should be noted that in the Unity engine, the transparency of an object is mainly determined by the shader in the material. In other words, the shader used by the material of the object can define whether the object should be regarded as transparent. For example, in the shader, there are usually keywords such as Cull Off, ZWrite Off, and Blend SrcAlpha OneMinusSrcAlpha to control transparency. The shader also contains a Queue command to specify the rendering queue (such as "Transparent" indicating that this shader should be rendered in the transparent queue). Therefore, these keyword settings of the shader for a specific object can be detected to determine whether to perform opaque rendering, semi-transparent rendering, or transparent rendering on the specific object.

[0045] Step S102 specifically includes the following steps:

[0046] Step S1021, Figure 2 is a schematic flow diagram of pixelating a specific object according to an embodiment of the present application Figure 1 , such as Figure 2 shown, if a specific object needs to be rendered opaquely, then in the BeforeForwardOpaque rendering stage of the Unity engine, based on the pixelation requirements of the specific object, a corresponding first RenderTexture texture is newly created through the Unity engine;

[0047] It should be noted that the BeforeForwardOpaque rendering stage occurs during the forward rendering of opaque objects. This stage is a CommandBuffer event defined in Unity's built-in rendering pipeline and is used to perform some customized rendering operations. It can be used to pre-render some effects so that they can interact correctly with other scene elements, such as shadows, ambient occlusion, or certain special lighting effects that need to be rendered before other opaque models. As Figure 2 shown, in this stage of the embodiment of the present application, a RenderTexture texture for pixelating a specific object (opaque) is newly created, and pixelated rendering is achieved.

[0048] Step S1022, Figure 3 is a schematic flow diagram of pixelating a specific object according to an embodiment of the present application Figure 2 , such as Figure 3 shown, if a specific object needs to be rendered semi-transparently, then in the BeforeForwardAlpha rendering stage of the Unity engine, based on the pixelation requirements of the specific object, a corresponding first RenderTexture texture is newly created through the Unity engine.

[0049] It should be noted that the BeforeForwardAlpha rendering stage is after the forward rendering of opaque objects in the Unity rendering pipeline, but before the rendering of transparent objects. This means that the objects rendered in this stage will be rendered after other opaque objects are drawn, but before transparent objects are processed. This stage is usually used to implement some special semi-transparent effects, such as fog effects and glowing effects that need to be after other opaque models but before transparent models. As Figure 3 shown, in this embodiment of the present application, a RenderTexture texture for pixelating specific objects (not semi-transparent) is newly created at this stage, and pixelated rendering is implemented.

[0050] Step S104: Based on the resolution adjustment requirement of the game water body, a corresponding second RenderTexture texture is newly created through the Unity engine, where the second RenderTexture texture is used to adjust the resolution of the game water body during the rendering of the game screen;

[0051] Specifically, step S104 Figure 4 is a schematic flowchart of the resolution adjustment of the game water body according to the embodiment of the present application. As Figure 4 shown, the rendering type of the game water body is semi-transparent rendering. In the BeforeForwardAlpha rendering stage of the Unity engine, based on the resolution adjustment requirement of the game water body, a corresponding second RenderTexture texture is newly created through the Unity engine, where the resolution adjustment requirement is to make the resolution of the game water body lower than the screen resolution.

[0052] It should be noted that in this embodiment, the rendering type of the game water body is semi-transparent rendering, so configuration rendering is performed in the BeforeForwardAlpha rendering stage. Similarly, for game water bodies with opaque rendering and transparent rendering, configuration rendering can also be performed in the corresponding rendering stages, which will not be elaborated here one by one.

[0053] Step S106: Based on the screen coordinates of the specific object and the first RenderTexture texture, and the screen coordinates of the game water body and the second RenderTexture texture, the game screen in the screen is rendered and shaded through the Unity engine.

[0054] Step S106 specifically includes the following steps:

[0055] Specifically, step S1061. As Figure 2As shown, if a specific object needs to be rendered opaquely, then in the RenderForwardOpaque rendering phase of the Unity engine, the Unity engine is used to render and color the game screen on the screen based on the screen coordinates of the specific object and the first RenderTexture texture.

[0056] It should be noted that the RenderForwardOpaque rendering phase is the phase in the Unity rendering pipeline where all opaque objects are rendered. In this phase, Unity will traverse all opaque objects in the scene (including most models and UI elements) and render them to the screen. It ensures that opaque objects can correctly occlude other objects and form correct occlusion relationships in the scene.

[0057] Step S1062 specifically, Figure 3 As shown, if a specific object needs to be rendered semi-transparently, then in the RenderForwardAlpha rendering phase of the Unity engine, based on the screen coordinates of the specific object and the first RenderTexture texture, the Unity engine is used to render and color the game screen on the screen.

[0058] It should be noted that the RenderForwardAlpha rendering phase is the phase in the Unity rendering pipeline where all translucent objects are rendered. In this phase, Unity will traverse all translucent objects in the scene (including translucent models, particle systems, UI elements, etc.). It ensures that transparent objects can be correctly mixed with other objects in the scene and correctly sorted according to transparency.

[0059] Step S1063 specifically, Figure 4 As shown, in the RenderForwardAlpha rendering stage of the Unity engine, based on the screen coordinates of the game water body and the second RenderTexture texture, the Unity engine is used to render and color the game screen on the screen.

[0060] It should be noted that the rendering type of the game water body in this embodiment is semi-transparent rendering, so the overall rendering of the game screen in the subsequent screen is performed in the RenderForwardAlpha rendering stage. Similarly, for opaque rendering and transparent rendering of game water bodies, they can also be performed in the corresponding rendering stages, which will not be elaborated here.

[0061] Through the above steps in the embodiment of the present application, pixelated rendering of specific objects is realized, and the combination of pixelation and non-pixelation in the game screen is realized, which improves the visual effect of the screen. In addition, the resolution adjustment of water rendering can effectively reduce the calculation amount of the shader, improve the real-time rendering, and solve the problem of how to strike a balance between the visual effect and real-time rendering of the game screen.

[0062] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0063] The present application embodiment provides a system for processing a game screen, which is used to execute the method in the above embodiment. Figure 5 is a structural block diagram of a game screen processing system according to an embodiment of the present application, such as Figure 5 As shown, the system includes a pixelation module, a resolution adjustment module and a rendering and shading module;

[0064] A pixelation module, used to create a corresponding first RenderTexture texture through the Unity engine according to the pixelation requirement for a specific object, wherein the first RenderTexture texture is used to pixelate the specific object in game screen rendering;

[0065] A resolution adjustment module, used to create a corresponding second RenderTexture texture through the Unity engine according to the resolution adjustment requirements for the game water body, wherein the second RenderTexture texture is used to adjust the resolution of the game water body in the game screen rendering;

[0066] The rendering and shading module is used to render and shade the game screen on the screen through the Unity engine according to the screen coordinates of a specific object and a first RenderTexture texture, as well as the screen coordinates of a game water body and a second RenderTexture texture.

[0067] Through the pixelation module, resolution adjustment module and rendering shading module in the embodiments of the present application, pixelated rendering of specific objects is achieved, and the combination of pixelation and non-pixelation in the game screen is realized, which improves the visual effect of the screen. In addition, the resolution adjustment of water body rendering can effectively reduce the calculation amount of the shader, improve the real-time rendering, and solve the problem of how to strike a balance between the visual effect and real-time rendering of the game screen.

[0068] It should be noted that each of the above modules can be a functional module or a program module, and can be implemented either by software or by hardware. For the modules implemented by hardware, each of the above modules can be located in the same processor; or each of the above modules can also be located in different processors in any combined form.

[0069] This embodiment also provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0070] Optionally, the above electronic device may further include a transmission device and an input / output device. Among them, the transmission device is connected to the above processor, and the input / output device is connected to the above processor.

[0071] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation manners, and will not be repeated here.

[0072] In addition, in combination with the game screen processing method in the above embodiments, an embodiment of the present application can provide a storage medium to implement. A computer program is stored on the storage medium; when the computer program is executed by a processor, it implements any one of the game screen processing methods in the above embodiments.

[0073] In one embodiment, a computer device is provided. The computer device can be a terminal. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements a game screen processing method. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, a trackball, or a touchpad provided on the housing of the computer device, or an external keyboard, a touchpad, or a mouse, etc.

[0074] In one embodiment, Figure 6 is a schematic internal structure diagram of an electronic device according to an embodiment of the present application. As Figure 6 shown, an electronic device is provided. The electronic device can be a server, and its internal structure diagram can be as Figure 6As shown. The electronic device includes a processor, a network interface, an internal memory, and a non-volatile memory connected by an internal bus. Among them, the non-volatile memory stores an operating system, a computer program, and a database. The processor is used to provide computing and control capabilities, the network interface is used to communicate with an external terminal through a network connection, the internal memory is used to provide an environment for the operation of the operating system and the computer program, the computer program, when executed by the processor, is used to implement a method for processing game screens, and the database is used to store data.

[0075] Those skilled in the art can understand that Figure 6 the structure shown in [figures] is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the electronic device to which the solution of the present application is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine some components, or have a different component layout.

[0076] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it may include the processes of the above method embodiments. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided by the present application may include non-volatile and / or volatile memories. The non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. The volatile memory may include random access memory (RAM) or an external cache. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.

[0077] Those skilled in the art should understand that the technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as within the scope described in this specification.

[0078] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the appended claims.

Claims

1. A method for processing a game screen, characterized in that, The method includes: Detecting the shader of a specific object to obtain the rendering type of the specific object, where the rendering type includes opaque rendering, translucent rendering, and transparent rendering; If the specific object needs to be rendered opaquely, in the BeforeForwardOpaque rendering stage of the Unity engine, based on the pixelization requirement of the specific object, a corresponding first RenderTexture is newly created by the Unity engine; if the specific object needs to be rendered semi-translucently, in the BeforeForwardAlpha rendering stage of the Unity engine, based on the pixelization requirement of the specific object, a corresponding first RenderTexture is newly created by the Unity engine, where the first RenderTexture is used to pixelize the specific object in the game screen rendering. The BeforeForwardOpaque rendering stage occurs during the forward rendering of opaque objects, and the BeforeForwardAlpha rendering stage occurs after the forward rendering of opaque objects but before the rendering of semi-translucent objects; Based on the requirement for adjusting the resolution of the game water body, a corresponding second RenderTexture is newly created by the Unity engine, where the second RenderTexture is used to adjust the resolution of the game water body in the game screen rendering; Based on the screen coordinates of the specific object and the first RenderTexture, and the screen coordinates of the game water body and the second RenderTexture, the game screen in the screen is rendered and shaded by the Unity engine.

2. The method according to claim 1, wherein Based on the screen coordinates of the specific object and the first RenderTexture, the rendering and shading of the game screen in the screen by the Unity engine includes: If the specific object needs to be rendered opaquely, in the RenderForwardOpaque rendering stage of the Unity engine, based on the screen coordinates of the specific object and the first RenderTexture, the game screen in the screen is rendered and shaded by the Unity engine.

3. The method according to claim 1, wherein Based on the screen coordinates of the specific object and the first RenderTexture, the rendering and shading of the game screen in the screen by the Unity engine includes: If the specific object needs to be rendered semi-translucently, in the RenderForwardAlpha rendering stage of the Unity engine, based on the screen coordinates of the specific object and the first RenderTexture, the game screen in the screen is rendered and shaded by the Unity engine.

4. The method according to claim 1, characterized in that, Based on the requirement for adjusting the resolution of the game water body, the newly creating of the corresponding second RenderTexture by the Unity engine includes: The rendering type of the game water body is semi-transparent rendering. In the BeforeForwardAlpha rendering stage of the Unity engine, based on the resolution adjustment requirement of the game water body, a corresponding second RenderTexture texture is newly created by the Unity engine, wherein the resolution adjustment requirement is used to make the resolution of the game water body lower than the screen resolution.

5. The method according to claim 4, characterized in that Based on the screen coordinates of the game water body and the second RenderTexture texture, rendering and coloring the game screen on the screen through the Unity engine includes: In the RenderForwardAlpha rendering stage of the Unity engine, the Unity engine is used to render and color the game screen on the screen based on the screen coordinates of the game water body and the second RenderTexture texture.

6. A processing system for game screens, characterized in that, The system is used to perform the method according to any one of claims 1 to 5, and the system comprises a pixelation module, a resolution adjustment module and a rendering and shading module; The pixelation module is used to create a corresponding first RenderTexture texture through the Unity engine according to the pixelation requirement for the specific object, wherein the first RenderTexture texture is used to pixelate the specific object in the game screen rendering; The resolution adjustment module is used to create a corresponding second RenderTexture texture through the Unity engine according to the resolution adjustment requirements for the game water body, wherein the second RenderTexture texture is used to adjust the resolution of the game water body in the game screen rendering; The rendering and shading module is used to render and shade the game screen on the screen through the Unity engine according to the screen coordinates of the specific object and the first RenderTexture texture, as well as the screen coordinates of the game water body and the second RenderTexture texture.

7. An electronic device, comprising a memory and a processor, characterized in that, A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Dynamic image editing method and device and electronic equipment

    CN115170709A