Game picture processing method, system and device and medium
The new RenderTexture texture is created through the Unity engine to pixelate and adjust the resolution of specific objects and water bodies, and combine the screen coordinates to render and color, which solves the problem of taking into account both the visual effects and real-time performance of game screen rendering, improves the visual effects and reduces the computational overhead.
Patent Information
- Application Number
- CN202411079036.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-08-07
AI Technical Summary
The prior art is difficult to take into account the visual effects and real-time performance of game screen rendering, especially when pixelation processing and water body rendering, it is difficult to achieve efficient pixelation of complex polygonal characters and water bodies.
The Unity engine creates a new RenderTexture texture, pixelated and water-based resolution adjustment is made to specific objects, and render and color it in combination with screen coordinates, so as to adjust the resolution of pixelated and water-based rendering of specific objects, reducing the amount of shader calculation.
It improves the visual effect of the game screen, reduces the amount of rendering calculation, improves real-time, and solves the problem of taking into account both visual effects and real-time.
Smart Images

Figure CN119113521A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer graphics technology, and in particular to a method, system, device and medium for processing game images. Background Art
[0002] Pixelation is a common art style in game development, which can bring unique visual effects to the game. The traditional pixelation method usually pixelates all objects in the early stage of game development. For example, using shaders to pixelate textures, shader pixelation can only pixelate objects with regular textures, such as the pixelation of pure blocks in the game "Minecraft". This method is difficult to pixelate complex polygonal characters; in addition, post-processing is used for pixelation, but it is difficult to pixelate specific objects using post-processing for screen pixelation. On the other hand, water is one of the important scene elements in the game. Realistic water effects can enhance the visual effects of the game, but it also brings huge computational overhead.
[0003] Currently, no effective solution has been proposed for the problem of how to balance the visual effects and real-time performance of game screen rendering in related technologies. Summary of the invention
[0004] The embodiments of the present application provide a method, system, device and medium for processing game screens, so as to at least solve the problem of how to balance the visual effects and real-time performance of game screen rendering in the related art.
[0005] In a first aspect, an embodiment of the present application provides a method for processing a game screen, the method comprising:
[0006] Based on the pixelation requirement for a specific object, a corresponding first RenderTexture texture is newly created through the Unity engine, wherein the first RenderTexture texture is used to pixelate the specific object in game screen rendering;
[0007] Based on the demand for adjusting the resolution of the game water body, a corresponding second RenderTexture texture is newly created through the Unity engine, wherein the second RenderTexture texture is used to adjust the resolution of the game water body in the rendering of the game screen;
[0008] 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 on the screen is rendered and colored through the Unity engine.
[0009] In some embodiments, based on the pixelation requirement for a specific object, before creating a corresponding first RenderTexture texture through the Unity engine, the method includes:
[0010] The shader of the specific object is detected to obtain a rendering type of the specific object, wherein the rendering type includes opaque rendering, semi-transparent rendering, and transparent rendering.
[0011] In some embodiments, based on the pixelation requirement for a specific object, creating a corresponding first RenderTexture texture through the Unity engine includes:
[0012] If the specific object needs to be rendered opaquely, in the BeforeForwardOpaque rendering phase of the Unity engine, based on the pixelation requirement for the specific object, a corresponding first RenderTexture texture is newly created by the Unity engine;
[0013] If the specific object needs to be rendered semi-transparently, then in the BeforeForwardAlpha rendering phase of the Unity engine, based on the pixelation requirement for the specific object, a corresponding first RenderTexture texture is newly created by the Unity engine.
[0014] In some embodiments, based on the screen coordinates of the specific object and the first RenderTexture texture, rendering and shading the game screen on the screen through the Unity engine includes:
[0015] If the 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.
[0016] In some embodiments, based on the screen coordinates of the specific object and the first RenderTexture texture, rendering and shading the game screen on the screen through the Unity engine includes:
[0017] If the specific object needs to be rendered semi-transparently, then in the RenderForwardAlpha 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.
[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, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first aspect when executing the computer program.
[0027] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect above.
[0028] Compared with the related art, the embodiments of the present application provide a method, system, device and medium for processing game screens, wherein the method, based on the pixelization requirement for a specific object, creates a corresponding first RenderTexture texture through the Unity engine, wherein the first RenderTexture texture is used to pixelate the specific object in the rendering of the game screen; based on the resolution adjustment requirement for the game water body, creates a corresponding second RenderTexture texture through the Unity engine, wherein the second RenderTexture texture is used to adjust the resolution of the game water body in the rendering of the game screen; 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 Unity engine is used to render and color the game screen on the screen, thereby realizing pixelated rendering of the specific object, realizing the combination of pixelation and non-pixelation in the game screen, and improving the visual effect of the screen. In addition, the resolution adjustment of the water body rendering can effectively reduce the calculation amount of the shader, improve the real-time performance of the rendering, and solve 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 illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on 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 The process of pixelating a specific object according to an embodiment of the present application is shown in FIG. Figure 1 ;
[0032] Figure 3 The process of pixelating a specific object according to an embodiment of the present application is shown in FIG. Figure 2 ;
[0033] Figure 4is a schematic diagram of a process for adjusting the game water resolution according to an embodiment of the present application;
[0034] Figure 5 is a structural block diagram of a game screen processing system according to an embodiment of the present application;
[0035] Figure 6 It is a schematic diagram of the internal structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated below in conjunction with 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 intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0037] Obviously, the drawings described below are only some examples or embodiments of the present application. For ordinary technicians in this field, the present application can also be applied to other similar scenarios based on these drawings without creative work. In addition, it can also be understood that although the efforts made in this development process may be complicated and lengthy, for ordinary technicians in this field related to the content disclosed in this application, some changes in design, manufacturing or production based on the technical content disclosed in this application are just conventional technical means, and should not be understood as insufficient content disclosed in this application.
[0038] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0039] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the" and the like involved in this application do not indicate a quantitative limitation, and may represent the singular or plural. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices. The words "connect", "connected", "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 "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects before and after are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0040] The present application embodiment provides a method for processing a game screen. Figure 1 is a flowchart of the steps of the game screen processing method according to an embodiment of the present application, such as Figure 1 As shown, the method comprises the following steps:
[0041] Step S102, based on the pixelation requirement for the specific object, a corresponding first RenderTexture texture is newly created through the Unity engine, wherein the first RenderTexture texture is used to pixelate the specific object in game screen rendering;
[0042] It should be noted that RenderTexture is a special type of texture in the Unity engine, which allows the rendering results to be captured to a texture instead of directly rendering to the screen as usual. In other words, RenderTexture is a texture stored in GPU memory that can be used as a target of a frame buffer object to capture rendering results.
[0043] Before step S102 , the method further includes step S101 , detecting the shader of the specific object to obtain the rendering type of the specific object, wherein 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 an object can define whether the object should be considered transparent. For example, there are usually keywords Cull Off, ZWrite Off, Blend SrcAlpha OneMinusSrcAlpha in the shader to control transparency. The shader also contains Queue commands to specify the rendering queue (such as "Transparent" means that this shader should be rendered in the transparent queue). Therefore, these keyword settings of the shader of a specific object can be detected to determine whether the specific object needs to be rendered opaquely, semi-transparently, or transparently.
[0045] Step S102 specifically includes the following steps:
[0046] Step S1021, Figure 2 The process of pixelating a specific object according to an embodiment of the present application is shown in FIG. Figure 1 ,like Figure 2 As shown, if a specific object needs to be rendered opaquely, then in the BeforeForwardOpaque rendering phase of the Unity engine, based on the pixelation requirement for the specific object, a corresponding first RenderTexture texture is newly created by the Unity engine;
[0047] It should be noted that the BeforeForwardOpaque rendering phase occurs during the forward rendering process of opaque objects (Opaque). This phase is a command buffer event defined in Unity's built-in rendering pipeline, which 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 some special lighting effects that need to be rendered before other opaque models. Figure 2 As shown, in this stage, the embodiment of the present application creates a new RenderTexture texture for pixelating a specific object (opaque) and implements pixelated rendering.
[0048] Step S1022, Figure 3 The process of pixelating a specific object according to an embodiment of the present application is shown in FIG. Figure 2 ,like Figure 3 As shown, if a specific object needs to be rendered semi-transparently, then in the BeforeForwardAlpha rendering phase of the Unity engine, based on the pixelation requirement for the specific object, a corresponding first RenderTexture texture is newly created by the Unity engine.
[0049] It should be noted that the BeforeForwardAlpha rendering stage is in the Unity rendering pipeline, after the forward rendering of opaque objects (Opaque), but before the rendering of translucent objects (Transparent). This means that 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 achieve some special translucent effects, such as fog effects and glow effects that need to be after other opaque models but before transparent models. Figure 3 As shown, in this stage, the embodiment of the present application creates a new RenderTexture texture for pixelating a specific object (not half-bright) and implements pixelated rendering.
[0050] Step S104, based on the resolution adjustment requirement for the game water body, a corresponding second RenderTexture texture is newly created through the Unity engine, wherein the second RenderTexture texture is used to adjust the resolution of the game water body in the game screen rendering;
[0051] Specifically, step S104: Figure 4 is a flow chart of adjusting the game water resolution according to an embodiment of the present application, such as Figure 4 As 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 for 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.
[0052] It should be noted that the rendering type of the game water body in this embodiment is semi-transparent rendering, so the rendering is configured in the BeforeForwardAlpha rendering stage. Similarly, for opaque rendering and transparent rendering of game water bodies, they can also be configured in the corresponding rendering stages, which will not be elaborated here.
[0053] Step S106, 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 on the screen is rendered and colored through the Unity engine.
[0054] Step S106 specifically includes the following steps:
[0055] Step S1061 specifically, 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 the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0069] This embodiment further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, 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 electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the 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 modes, and this embodiment will not be described in detail here.
[0072] In addition, in combination with the method for processing the game screen in the above embodiment, the embodiment of the present application can provide a storage medium for implementation. The storage medium stores a computer program; when the computer program is executed by the processor, any one of the methods for processing the game screen in the above embodiment is implemented.
[0073] In one embodiment, a computer device is provided, which may be a terminal. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected via a system bus. 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 via a network connection. When the computer program is executed by the processor, a method for processing a game screen is implemented. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a key, trackball, or touchpad provided on the housing of the computer device, or an external keyboard, touchpad, or mouse, etc.
[0074] In one embodiment, Figure 6 is a schematic diagram of the internal structure of an electronic device according to an embodiment of the present application, such as Figure 6 As shown, an electronic device is provided, which may be a server, and its internal structure diagram may be as shown in Figure 6As shown. The electronic device includes a processor, a network interface, an internal memory and a non-volatile memory connected through an internal bus, wherein 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 is executed by the processor to implement a method for processing a game screen, and the database is used to store data.
[0075] Those skilled in the art will understand that Figure 6 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0076] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an 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 (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0077] Those skilled in the art should understand that the technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0078] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for processing a game screen, It is characterized in that The method comprises: Based on the pixelation requirement for a specific object, a corresponding first RenderTexture texture is newly created through the Unity engine, wherein the first RenderTexture texture is used to pixelate the specific object in game screen rendering; Based on the demand for adjusting the resolution of the game water body, a corresponding second RenderTexture texture is newly created through the Unity engine, wherein the second RenderTexture texture is used to adjust the resolution of the game water body in the rendering of the game screen; 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 on the screen is rendered and colored through the Unity engine.
2. The method according to claim 1, It is characterized in that Based on the pixelation requirement for a specific object, before creating a corresponding first RenderTexture texture through the Unity engine, the method includes: The shader of the specific object is detected to obtain a rendering type of the specific object, wherein the rendering type includes opaque rendering, semi-transparent rendering, and transparent rendering.
3. The method according to claim 2, It is characterized in that Based on the pixelation requirements for a specific object, the first RenderTexture texture created by the Unity engine includes: If the specific object needs to be rendered opaquely, in the BeforeForwardOpaque rendering phase of the Unity engine, based on the pixelation requirement for the specific object, a corresponding first RenderTexture texture is newly created by the Unity engine; If the specific object needs to be rendered semi-transparently, then in the BeforeForwardAlpha rendering phase of the Unity engine, based on the pixelation requirement for the specific object, a corresponding first RenderTexture texture is newly created by the Unity engine.
4. The method according to claim 3, It is characterized in that Based on the screen coordinates of the specific object and the first RenderTexture texture, rendering and coloring the game screen on the screen through the Unity engine includes: If the 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.
5. The method according to claim 3, It is characterized in that Based on the screen coordinates of the specific object and the first RenderTexture texture, rendering and coloring the game screen on the screen through the Unity engine includes: If the specific object needs to be rendered semi-transparently, then in the RenderForwardAlpha 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.
6. The method according to claim 1, It is characterized in that Based on the need to adjust the resolution of the game water body, the corresponding second RenderTexture texture is newly created through the Unity engine, including: 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.
7. The method according to claim 6, It is 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.
8. A system for processing game images. It is characterized in that The system is used to execute the method described in any one of claims 1 to 7, and the system includes 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.
9. An electronic device comprising a memory and a processor, It is 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 7.
10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Image processing method and device, storage medium and electronic device
CN108176048A
Virtual model rendering method and device, storage medium and electronic equipment
CN113648655A
Dynamic image editing method and device and electronic equipment
CN115170709A
Water body effect rendering method and device, electronic equipment and storage medium
CN115409928A
Image generation method and device of virtual scene, storage medium and electronic device
CN116889723A
