User interface display method and device for unreal engine and electronic equipment
By configuring the display area structure of Unreal Engine as a backbuffer type rendering target, directly rendering and displaying, the resource waste problem in Unreal Engine is solved when advanced graphics special effects are not required, and bandwidth and time spending is reduced.
Patent Information
- Application Number
- CN202310697734.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-13
- Publication Date
- 2024-12-13
AI Technical Summary
When displaying user interfaces using Unreal Engine, it is often necessary to create non-backbuffer type rendering targets and perform bit block transfer operations, resulting in increased bandwidth and time spending, especially when the current frame does not need to display advanced graphics effects.
By preconfiguring the display area structure in the rendering hardware interface to at least two frame buffers mapped to the graphics application interface, including the default frame buffer and the custom frame buffer, detect whether the current frame needs to draw advanced graphics effects, if If not required, the display area structure is configured as a rendering target of the backbuffer type, and directly render and display to avoid creating rendering targets and bit block transfer operations of non-backbuffer type.
Reduces bandwidth and time expenditure in the Unreal Engine display user interface, especially without the need for advanced graphical effects, and reduces unnecessary resource consumption.
Smart Images

Figure CN119113511A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a user interface display method, device and electronic device for Unreal Engine. Background Art
[0002] As a game engine, Unreal Engine (UE) is often used to display user interfaces (UI) in various game systems, so that users who interact with the game system can see or operate them. In related technologies, when using Unreal Engine to display user interfaces, additional bandwidth and time costs are often introduced, resulting in a waste of resources. Summary of the invention
[0003] One purpose of the present application is to propose a user interface display method, device and electronic device for Unreal Engine. If the current frame does not need to display advanced graphics effects, the present application does not need to create an additional non-back buffer type rendering target in the current frame, nor does it need to use additional bit block transfer operations to copy the rendering results of the non-back buffer type rendering targets to the back buffer, thereby reducing the bandwidth cost and time cost in the process of Unreal Engine displaying the user interface.
[0004] According to one aspect of an embodiment of the present application, a user interface display method for Unreal Engine is disclosed, wherein a display area structure for displaying graphics in a rendering hardware interface is configured in advance to be mapped to at least two frame buffers in a graphics application program interface; the at least two frame buffers include: a default frame buffer associated with a window system corresponding to a back buffer, and a user-defined custom frame buffer corresponding to a non-back buffer; the method includes:
[0005] When drawing the user interface in the current frame, detecting whether drawing advanced graphic effects is required and supported when drawing the user interface in the current frame;
[0006] If it is not necessary to draw advanced graphics effects when drawing the user interface in the current frame, or if it is not supported to draw advanced graphics effects, then the current display area structure used to display the user interface in the current frame is configured as a rendering target of the back buffer type;
[0007] The rendering target of the back buffer type is rendered, and the back buffer is displayed in the current frame to display a user interface that has been drawn in the current frame.
[0008] According to one aspect of an embodiment of the present application, a user interface display device for an Unreal Engine is disclosed, wherein a display area structure for displaying graphics in a rendering hardware interface is configured in advance to be mapped to at least two frame buffers in a graphics application program interface; the at least two frame buffers include: a default frame buffer associated with a window system corresponding to a back buffer, and a user-defined custom frame buffer corresponding to a non-back buffer; the device includes:
[0009] A special effects detection module, configured to detect whether it is necessary and supported to draw advanced graphic special effects when drawing the user interface in the current frame;
[0010] A target configuration module configured to configure a current display area structure used to display the user interface in the current frame as a rendering target of a back buffer type if no advanced graphic effects need to be drawn or the advanced graphic effects are not supported when drawing the user interface in the current frame;
[0011] The rendering and display module is configured to render the rendering target of the back buffer type and display the back buffer in the current frame to display a user interface that has been drawn in the current frame.
[0012] In an exemplary embodiment of the present application, the device is configured as follows:
[0013] If drawing of advanced graphics effects is required and supported when drawing the user interface in the current frame, configuring the current display area structure as a first rendering target of a non-back buffer type, and detecting the number of user interface channels;
[0014] If the number of user interface channels is greater than one, creating a second render target of a non-back buffer type;
[0015] Sampling the post-processing result of the first rendering target, and rendering the sampling result to a second rendering target of a non-back buffer type;
[0016] The rendering result of the second rendering target of the non-back buffer type is copied to the back buffer by adopting a bit block transfer operation, and the back buffer is displayed in the current frame to display a user interface that has been drawn in the current frame.
[0017] In an exemplary embodiment of the present application, the device is configured as follows:
[0018] If the number of the user interface channels is one, creating a second rendering target of a back buffer type;
[0019] The post-processing result of the first rendering target is sampled, the sampling result is rendered to a second rendering target of the back buffer type, and the back buffer is displayed in the current frame to display a user interface that has been drawn in the current frame.
[0020] In an exemplary embodiment of the present application, the device is configured as follows:
[0021] After the last post-processing channel completes processing on the first rendering target, the channel of the user interface samples the post-processing result of the first rendering target.
[0022] In an exemplary embodiment of the present application, the special effect detection module is configured as follows:
[0023] Detecting a mark of a rendering thread for recording user interface drawing instructions in the current frame, and detecting a mark of a rendering hardware interface thread for executing user interface drawing instructions in the current frame, wherein an operation action of the rendering thread precedes an operation action of the rendering hardware interface thread by one frame;
[0024] Based on the mark of the rendering thread, detecting whether it is necessary to draw advanced graphic effects when drawing the user interface in the current frame;
[0025] Based on the flag of the rendering hardware interface thread, it is detected whether drawing of advanced graphic effects is supported when drawing the user interface in the current frame.
[0026] In an exemplary embodiment of the present application, the target configuration module is configured as follows:
[0027] Starting from the last pass of post-processing, the current display area structure is configured as a rendering target of the back buffer type.
[0028] In an exemplary embodiment of the present application, the advanced graphic effects include: blur graphic effects, malfunction graphic effects, and jitter graphic effects.
[0029] According to one aspect of an embodiment of the present application, an electronic device is disclosed, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the electronic device implements any one of the above embodiments.
[0030] According to one aspect of an embodiment of the present application, a computer program medium is disclosed, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a computer, the computer is caused to execute any one of the above embodiments.
[0031] According to one aspect of the embodiments of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the above various optional implementations.
[0032] In an embodiment of the present application, the display area structure for displaying graphics in the rendering hardware interface is configured in advance to be mapped to at least two frame buffers in the graphics application program interface; the at least two frame buffers include: a default frame buffer associated with the window system corresponding to the back buffer, and a user-defined custom frame buffer corresponding to the non-back buffer. When drawing the user interface in the current frame, it is detected whether it is necessary and supported to draw advanced graphics special effects when drawing the user interface in the current frame; if it is not necessary to draw advanced graphics special effects when drawing the user interface in the current frame, or it is not supported to draw advanced graphics special effects, the current display area structure used to display the user interface in the current frame is configured as a rendering target of the back buffer type; the rendering target of the back buffer type is rendered, and the back buffer is displayed in the current frame to display the drawn user interface in the current frame. In this way, if the current frame does not need to display advanced graphics special effects, the present application does not need to create an additional rendering target of the non-back buffer type in the current frame, nor does it need to use additional bit block transfer operations to copy the rendering results of the rendering target of the non-back buffer type to the back buffer, thereby reducing the bandwidth cost and time cost in the Unreal Engine display user interface process.
[0033] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.
[0034] It should be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The above and other objects, features and advantages of the present application will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings.
[0036] Figure 1 A schematic diagram showing an exemplary system architecture for displaying a user interface of an Unreal Engine according to an embodiment of the present application is shown.
[0037] Figure 2 A user interface showing a fault effect according to an embodiment of the present application is shown.
[0038] Figure 3 A user interface displayed with a blur effect according to an embodiment of the present application is shown.
[0039] Figure 4 A flowchart showing the related art of using the Unreal Engine to display a user interface.
[0040] Figure 5 The default interface design of the rendering hardware interface according to one embodiment of the present application is shown.
[0041] Figure 6 According to one embodiment of the present application, Figure 5 The modified interface design is obtained by modifying the rendering hardware interface shown in the embodiment.
[0042] Figure 7 A flowchart of a user interface display method for Unreal Engine according to an embodiment of the present application is shown.
[0043] Figure 8 A schematic diagram of the action execution of a data processing thread of an Unreal Engine according to an embodiment of the present application is shown.
[0044] Fig. 9 A detailed flowchart of a user interface display method for Unreal Engine according to an embodiment of the present application is shown.
[0045] Fig.10 A block diagram of a user interface display device for Unreal Engine according to an embodiment of the present application is shown.
[0046] Fig.11 A hardware diagram of an electronic device according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0047] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these example embodiments are provided so that the description of the present application will be more comprehensive and complete and the concepts of the example embodiments will be fully conveyed to those skilled in the art. The accompanying drawings are only schematic illustrations of the present application and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.
[0048] In addition, the described features, structures or characteristics may be combined in one or more example embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the example embodiments of the present application. However, those skilled in the art will appreciate that the technical solution of the present application may be practiced while omitting one or more of the specific details, or other methods, components, steps, etc. may be adopted. In other cases, known structures, methods, implementations or operations are not shown or described in detail to avoid obscuring the present application and making the various aspects of the present application obscure.
[0049] Some of the blocks shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0050] Figure 1 A schematic diagram of an exemplary system architecture for displaying a user interface of an Unreal Engine in one embodiment of the present application is shown.
[0051] like Figure 1 As shown, the execution subject for displaying the user interface of the Unreal Engine in the system architecture includes: one or more of a server 101, a portable computer 102, a tablet computer 103, and a smart phone 104. The server 101 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
[0052] The Unreal Engine provided in the above-mentioned execution body can be used to produce and display animations, and can also be used to produce and display user interfaces for the user 20 to watch or operate.
[0053] When using Unreal Engine to display a user interface, you often need to draw advanced graphic effects (for example, Glitch, Blur, Shake) to meet specific visual requirements.
[0054] For example: In a cyberpunk-style game system, when using the Unreal Engine to display the user interface, it is often necessary to draw Glitch fault graphic effects to display the fault effect. Figure 2The failure effect of the user interface shown is a visual expression that is an artistic processing of the broken and deformed images caused by the software and hardware failures of digital devices, thus meeting the visual needs of the cyberpunk style.
[0055] For another example, in game systems including but not limited to action games, flight simulation games, business strategy games, etc., when a user calls up a user interface for setting options during a game, the user interface for setting options often needs to display a blur effect. Figure 3 The blur effect of the user interface shown is a visual representation of the user interface of the setting options after blurring, thereby meeting the visual needs of the current scene.
[0056] Before introducing in detail the specific operation process of the method provided by this application, the key concepts involved in using the Unreal Engine to display the user interface are first introduced to illustrate the underlying details of using the Unreal Engine to display the user interface; then the method used by the related technology to use the Unreal Engine to display the user interface is introduced to illustrate the existing defects in the related technology.
[0057] (I) Key concepts involved in using Unreal Engine to display user interfaces
[0058] Unreal Engine usually uses its rendering hardware interface (RHI, Rendering Hardware Interface) to call the underlying graphics application program interface (ie, graphics API) to encapsulate various abstract computer resources to draw and display the user interface.
[0059] Specifically, the rendering hardware interface is a high-level graphics programming interface used by Unreal Engine to abstract and manage the underlying graphics application program interface. Through the rendering hardware interface, developers can easily write cross-platform graphics applications.
[0060] The rendering hardware interface provides an abstract code structure called Viewport (i.e., the "display area structure" in this application). The display area structure is used to refer to the area where graphics are displayed on the screen, and specifically defines how to map the rendered graphics to pixels on the screen. The size and position of the display area structure can be set and adjusted to display the required graphics on the screen.
[0061] The display area structure can be further configured as a Render Target (RT, referred to as a "render target" in this application). A render target is used to refer to the storage area of the graphics data drawn during the rendering process, usually a texture or frame buffer object. The rendering pipeline renders the graphics data to the render target, which can then be displayed on the screen or used as input for other calculations.
[0062] Graphics application programming interface, including but not limited to OpenGL, DirectX, etc. Among them, OpenGL stands for "OpenGraphics Library", which is a cross-platform graphics application programming interface that can be used to create two-dimensional or three-dimensional graphics across platforms. DirectX is a graphics application programming interface on the Windows platform, which can be used to create two-dimensional or three-dimensional graphics on the Windows platform.
[0063] In the graphics application program interface, a programmable memory area called FrameBuffer (i.e., "frame buffer" in this application) is usually provided for storing rendered graphics data. Each frame buffer usually includes multiple additional buffers, such as color buffer, depth buffer, template buffer, etc., for storing different types of rendered graphics data.
[0064] Furthermore, the frame buffer provided by the graphics application program interface can be further divided into two categories: DefaultFrameBuffer (ie, the "default frame buffer" referred to in this application) and User FrameBuffer (ie, the "custom frame buffer" referred to in this application).
[0065] The default frame buffer is associated with the window system, and the final rendered graphics data must usually be stored in the default frame buffer before the user interface can be displayed normally on the screen. The custom frame buffer is a buffer outside the default frame buffer, which is a user-defined buffer.
[0066] In the graphics application program interface, double buffering technology is usually used to draw and display the user interface. Double buffering technology defines two types of buffers: Back Buffer (i.e., "back buffer" in this application) and non-Back Buffer (i.e., "non-back buffer" in this application).
[0067] The back buffer is a buffer for storing the final rendered graphics data. Usually, the final rendered graphics data must be stored in the back buffer before the user interface can be displayed normally on the screen. The non-back buffer is a buffer outside the back buffer.
[0068] It can be seen that the default frame buffer provided by the graphics application program interface corresponds to the back buffer in the double buffering technology; the custom frame buffer provided by the graphics application program interface corresponds to the non-back buffer in the double buffering technology.
[0069] It should be noted that in Unreal Engine, a display area structure in the rendering hardware interface can only be configured to correspond to a frame buffer in the graphics application interface by default. That is, a display area structure in the rendering hardware interface can only be configured to correspond to the default frame buffer in the graphics application interface by default, becoming a back buffer type rendering target; or can only be configured to correspond to the custom frame buffer in the graphics application interface, becoming a non-back buffer type rendering target.
[0070] When rendering is performed for a back buffer type rendering target, the resulting rendered graphics data will be directly located in the back buffer; when rendering is performed for a non-back buffer type rendering target, the resulting rendered graphics data will be directly located in the non-back buffer.
[0071] (II) Related technologies use Unreal Engine to display user interfaces
[0072] As mentioned above, when using Unreal Engine to display a user interface, it is often necessary to draw advanced graphics effects. In order to meet the need for drawing advanced graphics effects, related technologies use the following methods to display the user interface:
[0073] A static variable is pre-configured in the Unreal Engine to indicate whether to display advanced graphics effects. If some frames need to display a user interface containing advanced graphics effects, the static variable must be enabled in advance, and then when displaying the user interface in each frame, regardless of whether the current frame needs to display advanced graphics effects, a non-back buffer type rendering target must be created first, and then the non-back buffer type rendering target must be rendered, and then the Blit operation (i.e., the "bit block transfer operation" referred to in this application) is used to copy the rendering result of the non-back buffer type rendering target to the back buffer, and finally the back buffer is displayed in the current frame, so that the drawn user interface is displayed in the current frame.
[0074] However, whether creating a non-back buffer type rendering target or using a bit block transfer operation to copy the rendering result of a non-back buffer type rendering target to the back buffer, the ultimate purpose is to serve the display of advanced graphics effects. Therefore, if the current frame does not need to display advanced graphics effects, the related art method of "creating a non-back buffer type rendering target" and "using a bit block transfer operation to copy the rendering result of a non-back buffer type rendering target to the back buffer" are both additional unnecessary operations in the current frame.
[0075] Since "creating a non-back buffer type rendering target" will consume bandwidth, and "using bit block transfer operations to copy the rendering results of the non-back buffer type rendering target to the back buffer" will consume time, if the current frame does not need to display advanced graphics effects, this method of related technology will cause additional bandwidth and time costs in the current frame.
[0076] Figure 4 A flowchart showing the related art using Unreal Engine to display a user interface. Figure 4 In the related art, if some frames need to display a user interface containing advanced graphic effects, the static variable bAndroidOperGLSupportsBackbufferSampling must be enabled in advance.
[0077] Once the static variable is enabled, according to the rendering process of the Unreal Engine, when the last pass of the Post Process (i.e., the "last pass of post processing" in this application) is reached, the relevant technology will create a new non-back buffer type rendering target RT1. Then, the non-back buffer type RT1 is rendered by the last pass of the post processing.
[0078] When the last pass of post-processing renders the non-back buffer type RT1, it is determined whether the current frame needs to display advanced graphics effects.
[0079] If the current frame needs to display advanced graphics effects, then after the last channel of post-processing completes the rendering of the non-back buffer type RT1, in the related art, the UI Pass (i.e., the "user interface channel" referred to in this application) samples the rendering results of the non-back buffer type RT1. Since it is impossible to read and write to the same rendering target at the same time (i.e., it is impossible to sample and record the sampling results of the same rendering target at the same time), it is necessary to create another non-back buffer type rendering target RT2. The user interface channel samples the non-back buffer type RT1, and applies the special effects algorithm corresponding to the advanced graphics effects to render the sampling results of the non-back buffer type RT1 to the non-back buffer type RT2. Then, a bit block transfer operation is used to copy the rendering results of the non-back buffer type RT2 to the back buffer. Finally, the back buffer is displayed in the current frame, so that the completed user interface is displayed in the current frame.
[0080] If the current frame does not need to display advanced graphics effects, after the last post-processing channel completes rendering of the non-back buffer type RT1, in the related art, the user interface channel continues to render the non-back buffer type RT1, and then uses a bit block transfer operation to copy the rendering result of the non-back buffer type RT1 to the back buffer. Finally, the back buffer is displayed in the current frame, so that the drawn user interface is displayed in the current frame.
[0081] It can be seen from this that as long as some frames need to display advanced graphics effects, even if the current frame does not need to display advanced graphics effects, the relevant technology will additionally create a non-back buffer type rendering target in the current frame, and additionally use bit block transfer operations to copy the rendering results of the non-back buffer type rendering targets to the back buffer, thereby causing additional bandwidth costs and time costs in the current frame.
[0082] It should be noted that Post Process is a technology that reprocesses graphics after the scene is rendered. Post Process can be used to change color, contrast, brightness, saturation, blur, etc.; different effects can also be applied to change the appearance of the scene, such as blur, depth of field, etc. These effects can be applied to the entire scene or a specific area by adding a Post Process Volume.
[0083] Pass, or channel, usually refers to the rendering process corresponding to a specific rendering step. A Pass is a rendering of a rendering target completed according to a specific rendering step.
[0084] According to the rendering process of Unreal Engine, the "last pass of post-processing" and the "user interface pass" are adjacent. Therefore, after the last pass of post-processing completes the rendering of the render target, the user interface pass will then further render the render target.
[0085] As described above, as long as some frames need to display advanced graphics effects, even if the current frame does not need to display advanced graphics effects, the relevant technology will additionally create a non-back buffer type rendering target in the current frame, and additionally use bit block transfer operations to copy the rendering results of the non-back buffer type rendering targets to the back buffer, thereby causing additional bandwidth costs and time costs in the current frame.
[0086] In response to this defect of the related art, the present application provides a user interface display method for Unreal Engine. If the current frame does not need to display advanced graphics effects, the present application does not need to create an additional non-back buffer type rendering target in the current frame, nor does it need to use additional bit block transfer operations to copy the rendering results of the non-back buffer type rendering targets to the back buffer, thereby reducing the bandwidth cost and time cost in the process of Unreal Engine displaying the user interface.
[0087] Specifically, in the embodiment of the present application, in order to be able to select different frame buffers for the display area structure switch according to whether advanced graphics effects need to be displayed in the current frame, it is necessary to make a display area structure in the rendering hardware interface correspond to at least two frame buffers in the graphics application interface: the default frame buffer and the custom frame buffer. This can ensure that when the rendering state is set through the display area structure, the display area structure can be correctly configured as a rendering target of the back buffer type, or as a rendering target of a non-back buffer type.
[0088] To this end, in an embodiment of the present application, the default interface design of the rendering hardware interface is modified in advance - specifically, the display area structure in the rendering hardware interface is pre-configured to map to the default frame buffer and the custom frame buffer in the graphics application interface.
[0089] Figure 5 The default interface design of the rendering hardware interface in one embodiment of the present application is shown. Figure 6 The embodiment of the present application shows Figure 5 The modified interface design is obtained by modifying the rendering hardware interface shown in the embodiment.
[0090] See also Figure 5 In one embodiment, the graphics application program interface called by the rendering hardware interface of the Unreal Engine is OpenGL.
[0091] In this embodiment, in the default interface design of the rendering hardware interface, the display area structure FOpenGLViewport obtains the rendering target returned by the GetBackBuffer() function by calling the GetBackBuffer() function. The rendering target returned by the GetBackBuffer() function may be of the Back Buffer type or of a non-Back Buffer type.
[0092] If the rendering target returned by the GetBackBuffer() function is of the Back Buffer type, that is, the back buffer type, the display area structure FOpenGLViewport will always correspond to the DefaultFramebuffer in OpenGL, that is, only to the default frame buffer.
[0093] If the rendering target returned by the GetBackBuffer() function is of a non-Back Buffer type, that is, a non-back buffer type, the display area structure FOpenGLViewport will always correspond to the UserFramebuffer in OpenGL, that is, only to the custom frame buffer.
[0094] See also Figure 6 In one embodiment, in order to be able to switch and select different frame buffers for the display area structure FOpenGLViewport according to whether advanced graphics effects need to be displayed in the current frame, Figure 5 The default interface design shown in the embodiment is modified.
[0095] Specifically, in this embodiment, in the modified interface design of the rendering hardware interface, the display area structure FOpenGLViewport calls the GetBackBuffer (bool UseBackBuffer) function, and the bool parameter UseBackBuffer passed into the function determines whether the value returned by the function is the Default Framebuffer or the UserFramebuffer.
[0096] If the value returned by the GetBackBuffer(bool UseBackBuffer) function in the current frame is DefaultFramebuffer, the display area structure FOpenGLViewport in the current frame corresponds to the default frame buffer in OpenGL, and the display area structure FOpenGLViewport can be configured as a rendering target of the back buffer type in the current frame.
[0097] If the value returned by the GetBackBuffer(bool UseBackBuffer) function in the current frame is UserFramebuffer, the display area structure FOpenGLViewport in the current frame corresponds to the custom frame buffer in OpenGL, and the display area structure FOpenGLViewport can be configured as a rendering target of a non-back buffer type in the current frame.
[0098] In the embodiment of the present application, after the display area structure in the rendering hardware interface is configured to be mapped to the default frame buffer and the custom frame buffer in the graphics application program interface, the Unreal Engine can Figure 7 The flowchart shown displays a user interface. Figure 7 The flowchart of the user interface display method for Unreal Engine provided by the present application is shown. Figure 7 , the method comprising:
[0099] Step S310: When drawing the user interface in the current frame, detecting whether drawing advanced graphic effects is required and supported when drawing the user interface in the current frame;
[0100] Step S320: If it is not necessary to draw advanced graphic effects when drawing the user interface in the current frame, or if it is not supported to draw advanced graphic effects, the current display area structure used to display the user interface in the current frame is configured as a rendering target of the back buffer type;
[0101] Step S330: Render the rendering target of the back buffer type, and display the back buffer in the current frame to display the rendered user interface in the current frame.
[0102] In an embodiment of the present application, when drawing the user interface in the current frame, not only is it detected whether it is necessary to draw advanced graphic effects when drawing the user interface in the current frame, but it is also detected whether it supports drawing advanced graphic effects when drawing the user interface in the current frame.
[0103] Figure 8 Figure 1 shows the action execution diagram of the Unreal Engine's data processing thread. Figure 8 The data processing of Unreal Engine is multi-threaded, with three main threads: Game thread, Render thread, and RHI hardware interface thread, and the actions of these three threads are staggered one frame in time (such as Figure 8 As shown, the rendering thread is in F n+1 The action performed in the frame is in the next frame F n+2 The frame comes to the rendering hardware interface thread).
[0104] Moreover, in Unreal Engine, the user interface drawing instructions are recorded in the rendering thread, while the user interface drawing instructions are executed in the rendering hardware interface thread. As a result, the user interface drawing instructions executed by the rendering hardware interface thread in the current frame are actually recorded in the previous frame, corresponding to the drawing requirements of the previous frame. As a result, the first frame that needs to draw advanced graphics effects does not actually support the drawing of advanced graphics effects; it is only from the second frame that it can support the drawing of advanced graphics effects. That is, compared with the rendering requirements of advanced graphics effects, the actual rendering action of advanced graphics effects will be delayed by one frame.
[0105] However, it should be noted that although the actual rendering action of advanced graphic effects will be delayed by one frame compared to the rendering requirements of advanced graphic effects, it has almost no impact on user perception because the human eye can hardly recognize the visual deviation of one frame.
[0106] If it is not necessary to draw advanced graphics effects when drawing the user interface in the current frame, or if it is not supported to draw advanced graphics effects, it means that it is not necessary to display advanced graphics effects when drawing the user interface in the current frame. Since the display area structure in the rendering hardware interface has been pre-configured to map to the default frame buffer and the custom frame buffer in the graphics application interface, in this case, the current display area structure that displays the user interface in the current frame can be directly configured as a back buffer type rendering target. Then directly render the back buffer type rendering target, and after the rendering is completed, display the back buffer in the current frame, and the drawn user interface can be displayed in the current frame.
[0107] It can be seen that in the embodiment of the present application, if the current frame does not need to display advanced graphics effects, then the present application does not need to create an additional non-back buffer type rendering target in the current frame, nor does it need to use additional bit block transfer operations to copy the rendering results of the non-back buffer type rendering targets to the back buffer, thereby reducing the bandwidth cost and time cost in the Unreal Engine display user interface process.
[0108] Since the time consumption of the block transfer operation will vary due to differences in platform implementation and the size of the data to be copied, it is difficult to quantitatively measure the time cost reduced by this application. However, the bandwidth cost reduced by this application can be quantitatively calculated: taking a mobile phone with a 1080P resolution as an example, assuming that the rendering resolution is also 1080P, that is, 1920*1080 pixels. Considering the most common RGBA8888 image format, that is, each pixel has 32 bits. Considering the currently very common 60FPS video refresh rate, in this case, this application can reduce the bandwidth cost of 1920*1080*32bit*60=3981312000bit per second, that is, it can reduce the bandwidth cost of approximately 475MB per second.
[0109] In one embodiment, when drawing a user interface in the current frame, detecting whether drawing advanced graphic effects is required and supported when drawing the user interface in the current frame includes:
[0110] Detecting a mark of a rendering thread for recording user interface drawing instructions in a current frame, and detecting a mark of a rendering hardware interface thread for executing user interface drawing instructions in a current frame, wherein an operation action of the rendering thread precedes an operation action of the rendering hardware interface thread by one frame;
[0111] Based on the flag of the rendering thread, detect whether advanced graphics effects need to be drawn when drawing the user interface in the current frame;
[0112] Based on the flag of the rendering hardware interface thread, detect whether to support drawing advanced graphics effects when drawing the user interface in the current frame.
[0113] In this embodiment, when in a certain frame F n When you need to draw advanced graphics effects, you can use frame F n Mark the game thread; then at frame F n The next frame F n+1 , the tag will flow to the rendering thread; then in frame F n+1 The next frame F n+2 , the tag will flow to the rendering hardware interface thread.
[0114] Therefore, if the rendering thread has a mark indicating advanced graphics effects in the current frame, it means that advanced graphics effects need to be drawn when drawing the user interface in the current frame; conversely, if the rendering thread does not have a mark indicating advanced graphics effects in the current frame, it means that advanced graphics effects do not need to be drawn when drawing the user interface in the current frame.
[0115] If the rendering hardware interface thread has a mark indicating advanced graphics effects in the current frame, it means that when drawing the user interface in the current frame, it supports drawing advanced graphics effects; conversely, if the rendering hardware interface thread does not have a mark indicating advanced graphics effects in the current frame, it means that when drawing the user interface in the current frame, it does not support drawing advanced graphics effects.
[0116] In one embodiment, a current display area structure for displaying a user interface in a current frame is configured as a rendering target of a back buffer type, including:
[0117] Starting from the last pass of post-processing, configure the current display region structure as a render target of type backbuffer.
[0118] In this embodiment, when drawing the user interface in the current frame, it is not necessary to display advanced graphics effects. In this case, starting from the last pass of post-processing, the current display area structure is configured as a back buffer type rendering target and rendered. In this way, the user interface channel can continue to directly render the back buffer type rendering target without creating and switching rendering targets, thereby reducing bandwidth overhead.
[0119] In one embodiment, the method provided by the present application further includes:
[0120] If drawing advanced graphics effects is required and supported when drawing the user interface in the current frame, the current display area structure is configured as the first rendering target of the non-back buffer type, and the number of user interface channels is detected;
[0121] If the number of UI channels is greater than one, then creating a second render target of type non-backbuffer;
[0122] Sampling the post-processing result of the first rendering target, and rendering the sampled result to a second rendering target of a non-back buffer type;
[0123] The rendering result of the second rendering target of the non-back buffer type is copied to the back buffer by adopting a bit block transfer operation, and the back buffer is displayed in the current frame to display the drawn user interface in the current frame.
[0124] In this embodiment, if, when drawing the user interface in the current frame, it is necessary to draw advanced graphic effects and the drawing of advanced graphic effects is supported, it means that the current frame needs to display advanced graphic effects.
[0125] Since advanced graphics effects require sampling of the render target, and the back buffer type render target does not support sampling, in this case, the current display area structure needs to be configured as the first render target of the non-back buffer type to support subsequent sampling.
[0126] In addition to creating a first rendering target of a non-back buffer type, a second rendering target for storing sampling results needs to be created. The type of the second rendering target is related to the number of user interface channels.
[0127] Specifically, if there are multiple user interface channels, in this case, not only the first rendering target but also the second rendering target needs to be sampled, thereby generating a user interface with multiple layers of advanced graphic effects superimposed.
[0128] For example: there are two user interface channels; and the second rendering target itself is an ordinary user interface without advanced graphic effects. The first channel of the user interface samples the first rendering target, and renders the sampling result of the first rendering target to the second rendering target, thereby applying a broken graphic effect to the ordinary user interface corresponding to the second rendering target. In order to apply another layer of blurred graphic effects, the second channel of the user interface needs to create a third rendering target that matches the size of the blurred user interface, and then sample the second rendering target. The sampling result of the second rendering target is then rendered to the third rendering target, thereby applying a blurred graphic effect to the third rendering target. Finally, the third rendering target with the blurred graphic effect applied is drawn as a texture onto the second rendering target, thereby obtaining a user interface with superimposed broken graphic effects and blurred graphic effects.
[0129] Therefore, if the number of user interface channels is greater than one, it means that the second rendering target needs to be sampled, so the second rendering target is configured as a non-back buffer type.
[0130] Then, after the post-processing of the first rendering target is completed, the post-processing result of the first rendering target is sampled, and the sampled result is rendered to a second rendering target of a non-back buffer type.
[0131] Then, after the rendering of the second rendering target of the non-back buffer type is completed, a bit block transfer operation is used to copy the rendering result of the second rendering target of the non-back buffer type to the back buffer. Finally, the back buffer is displayed in the current frame, and the drawn user interface can be displayed in the current frame.
[0132] In one embodiment, the method provided by the present application further includes:
[0133] If the number of UI channels is one, then create a second render target of back buffer type;
[0134] The post-processing result of the first rendering target is sampled, and the sampling result is rendered to a second rendering target of a back buffer type, and the back buffer is displayed in the current frame to display a user interface that has been drawn in the current frame.
[0135] In this embodiment, if when drawing the user interface in the current frame, it is necessary to draw advanced graphic effects and support drawing advanced graphic effects, it means that the current frame needs to display advanced graphic effects, so the current display area structure is configured as the first rendering target of the non-back buffer type to support subsequent sampling.
[0136] Furthermore, if the number of user interface channels is one, it means that the second rendering target no longer needs to be sampled, so the second rendering target is configured as a back buffer type.
[0137] Then, after the post-processing of the first rendering target is completed, the post-processing result of the first rendering target is sampled, and the sampled result is rendered to a second rendering target of the back buffer type.
[0138] Then, after the rendering of the second rendering target of the back buffer type is completed, the back buffer can be directly displayed in the current frame without the need for a bit block transfer operation, thereby displaying a drawn user interface in the current frame.
[0139] In one embodiment, sampling the post-processing result of the first rendering target includes:
[0140] After the last pass of the post-processing completes processing on the first rendering target, the user interface pass samples the post-processing result of the first rendering target.
[0141] Since the "last post-processing channel" and the "user interface channel" are adjacent, in this embodiment, after the last post-processing channel completes processing of the first rendering target, the user interface channel then samples the post-processing result of the first rendering target.
[0142] Fig. 9 A detailed flow chart of a user interface display method for Unreal Engine in one embodiment of the present application is shown.
[0143] See also Fig. 9 , specifically in the game scene, in one embodiment, the game client set on the user terminal is developed and generated based on the Unreal Engine. In the game client, the user interface of the setting options that the user calls up on the game homepage before playing does not need to display any advanced graphic effects. After entering the game, the user interface of the setting options that the user calls up in the middle of the game needs to display blurred graphic effects; and the user interface of the interactive props (for example: interactive virtual computers; interactive virtual screens; interactive virtual weapons, etc.) generated by the game client in the game scene needs to display broken graphic effects.
[0144] Applying the method provided by this application, if the user interface to be displayed in the current frame is a user interface for setting options that the user calls up during the game, or a user interface for interactive props generated in the game scene, and the current frame is not the first frame of the user interface to be displayed, the game client will detect that it is necessary and supports drawing advanced graphics effects when drawing the user interface in the current frame, which indicates that the current frame needs to display advanced graphics effects. The game client then configures the current display area structure as the first rendering target RT1 of the non-back buffer type, and renders the non-back buffer type RT1 by the last channel of post-processing. Then the number of user channels is detected.
[0145] If there are multiple user interface channels, a second rendering target RT2 of non-back buffer type is created, and the user interface channel renders the non-back buffer type RT2. Then, a bit block transfer operation is used to copy the rendering result of the non-back buffer type RT2 to the back buffer. Finally, the back buffer is displayed on the screen, that is, the drawn user interface is displayed.
[0146] If there is one user interface channel, a second rendering target RT2 of the back buffer type is created, and the user interface channel renders the back buffer type RT2. Finally, the back buffer is displayed on the screen, that is, the drawn user interface is displayed.
[0147] If the user interface to be displayed in the current frame is the user interface of the setting options called up on the game homepage, the game client will detect that it is not necessary or does not support drawing advanced graphics effects when drawing the user interface in the current frame, which means that the current frame does not need to display advanced graphics effects. Then, starting from the last pass of post-processing, the game client configures the current display area structure as a back buffer type rendering target and renders it; after the last pass of post-processing completes the rendering of the back buffer type rendering target, the user interface channel can continue to directly render the back buffer type rendering target. Finally, the back buffer is displayed on the screen, that is, the completed user interface is displayed.
[0148] Compared to the situation where the current frame needs to display advanced graphics effects (i.e., the user interface to be displayed in the current frame is the user interface of the setting options called up by the user during the game, or is the user interface of the interactive props generated in the game scene), when the current frame does not need to display advanced graphics effects (i.e., the user interface to be displayed in the current frame is the user interface of the setting options called up on the game homepage), there is no need to create a first rendering target RT1 of the non-back buffer type, thereby reducing the bandwidth cost required to create the first rendering target RT1 of the non-back buffer type. Furthermore, compared to the situation where not only the current frame needs to display advanced graphics effects, but also there are multiple user interfaces, when the current frame does not need to display advanced graphics effects, there is no need to use a bit block transfer operation to copy the rendering result of the non-back buffer type RT2, thereby reducing the time cost required to use a bit block transfer operation to copy the rendering result of the non-back buffer type RT2.
[0149] Fig.10 A block diagram of a user interface display device for Unreal Engine according to an embodiment of the present application is shown, wherein a display area structure for displaying graphics in a rendering hardware interface is configured in advance to be mapped to at least two frame buffers in a graphics application program interface; the at least two frame buffers include: a default frame buffer associated with a window system corresponding to a back buffer, and a user-defined custom frame buffer corresponding to a non-back buffer; the device includes:
[0150] The special effect detection module 410 is configured to detect whether the drawing of advanced graphic special effects is required and supported when drawing the user interface in the current frame;
[0151] The target configuration module 420 is configured to configure the current display area structure used to display the user interface in the current frame as a rendering target of the back buffer type if no advanced graphics effects need to be drawn when drawing the user interface in the current frame, or if the advanced graphics effects are not supported;
[0152] The rendering and display module 430 is configured to render a rendering target of the back buffer type and display the back buffer in the current frame to display a rendered user interface in the current frame.
[0153] In an exemplary embodiment of the present application, the device is configured as follows:
[0154] If drawing advanced graphics effects is required and supported when drawing the user interface in the current frame, the current display area structure is configured as the first rendering target of the non-back buffer type, and the number of user interface channels is detected;
[0155] If the number of UI channels is greater than one, then creating a second render target of type non-backbuffer;
[0156] Sampling the post-processing result of the first rendering target, and rendering the sampled result to a second rendering target of a non-back buffer type;
[0157] The rendering result of the second rendering target of the non-back buffer type is copied to the back buffer by adopting a bit block transfer operation, and the back buffer is displayed in the current frame to display the drawn user interface in the current frame.
[0158] In an exemplary embodiment of the present application, the device is configured as follows:
[0159] If the number of UI channels is one, then create a second render target of back buffer type;
[0160] The post-processing result of the first rendering target is sampled, and the sampling result is rendered to a second rendering target of a back buffer type, and the back buffer is displayed in the current frame to display a user interface that has been drawn in the current frame.
[0161] In an exemplary embodiment of the present application, the device is configured as follows:
[0162] After the last pass of the post-processing completes processing on the first rendering target, the post-processing result of the first rendering target is sampled by the pass of the user interface.
[0163] In an exemplary embodiment of the present application, the special effect detection module 410 is configured as follows:
[0164] Detecting a mark of a rendering thread for recording user interface drawing instructions in a current frame, and detecting a mark of a rendering hardware interface thread for executing user interface drawing instructions in a current frame, wherein an operation action of the rendering thread precedes an operation action of the rendering hardware interface thread by one frame;
[0165] Based on the flag of the rendering thread, detect whether advanced graphics effects need to be drawn when drawing the user interface in the current frame;
[0166] Based on the flag of the rendering hardware interface thread, detect whether to support drawing advanced graphics effects when drawing the user interface in the current frame.
[0167] In an exemplary embodiment of the present application, the target configuration module 420 is configured as follows:
[0168] Starting from the last pass of post-processing, configure the current display region structure as a render target of type backbuffer.
[0169] In an exemplary embodiment of the present application, the advanced graphic effects include: blur graphic effects, malfunction graphic effects, and jitter graphic effects.
[0170] Reference below Fig.11 An electronic device 50 according to an embodiment of the present application is described. Fig.11 The electronic device 50 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0171] like Fig.11 As shown, the electronic device 50 is in the form of a general computing device. The components of the electronic device 50 may include, but are not limited to: at least one processing unit 510, at least one storage unit 520, and a bus 530 connecting different system components (including the storage unit 520 and the processing unit 510).
[0172] The storage unit 520 stores program codes, which can be executed by the processing unit 510, so that the processing unit 510 performs the steps according to various exemplary embodiments of the present invention described in the description of the exemplary method described above in this specification. For example, the processing unit 510 can perform the following steps: Figure 7 The steps shown in .
[0173] The storage unit 520 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 5201 and / or a cache storage unit 5202 , and may further include a read-only storage unit (ROM) 5203 .
[0174] The storage unit 520 may also include a program / utility 5204 having a set (at least one) of program modules 5205, such program modules 5205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0175] Bus 530 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0176] The electronic device 50 may also communicate with one or more external devices 600 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 50, and / or may communicate with any device that enables the electronic device 50 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 550. The input / output (I / O) interface 550 is connected to a display unit 540. Furthermore, the electronic device 50 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 560. As shown, the network adapter 560 communicates with other modules of the electronic device 50 via a bus 530. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 50, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0177] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation methods of the present application.
[0178] In an exemplary embodiment of the present application, a computer-readable storage medium is further provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a computer, the computer executes the method described in the above method embodiment.
[0179] According to one embodiment of the present application, a program product for implementing the method in the above method embodiment is also provided, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited to this. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0180] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0181] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0182] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0183] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as JAVA, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0184] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0185] In addition, although the steps of the method in the present application are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0186] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation methods of the present application.
[0187] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the appended claims.
Claims
1. A user interface display method for Unreal Engine, characterized in that: Pre-configuring a display area structure for displaying graphics in a rendering hardware interface to be mapped to at least two frame buffers in a graphics application program interface; The at least two frame buffers include: a default frame buffer associated with a window system corresponding to a back buffer, and a user-defined custom frame buffer corresponding to a non-back buffer; the method includes: When drawing the user interface in the current frame, detecting whether drawing advanced graphic effects is required and supported when drawing the user interface in the current frame; If it is not necessary to draw advanced graphics effects when drawing the user interface in the current frame, or if it is not supported to draw advanced graphics effects, then the current display area structure used to display the user interface in the current frame is configured as a rendering target of the back buffer type; The rendering target of the back buffer type is rendered, and the back buffer is displayed in the current frame to display a user interface that has been drawn in the current frame.
2. The method according to claim 1, characterized in that The method further comprises: If drawing of advanced graphics effects is required and supported when drawing the user interface in the current frame, configuring the current display area structure as a first rendering target of a non-back buffer type, and detecting the number of user interface channels; If the number of user interface channels is greater than one, creating a second render target of a non-back buffer type; Sampling the post-processing result of the first rendering target, and rendering the sampling result to a second rendering target of a non-back buffer type; The rendering result of the second rendering target of the non-back buffer type is copied to the back buffer by adopting a bit block transfer operation, and the back buffer is displayed in the current frame to display a user interface that has been drawn in the current frame.
3. The method according to claim 2, characterized in that The method further comprises: If the number of the user interface channels is one, creating a second rendering target of a back buffer type; The post-processing result of the first rendering target is sampled, the sampling result is rendered to a second rendering target of the back buffer type, and the back buffer is displayed in the current frame to display a user interface that has been drawn in the current frame.
4. The method according to claim 2 or 3, characterized in that: Sampling the post-processing result of the first rendering target includes: After the last post-processing channel completes processing on the first rendering target, the post-processing result of the first rendering target is sampled by the channel of the user interface.
5. The method according to claim 1, characterized in that When drawing the user interface in the current frame, detecting whether drawing advanced graphic effects is required and supported when drawing the user interface in the current frame includes: Detecting a mark of a rendering thread for recording user interface drawing instructions in the current frame, and detecting a mark of a rendering hardware interface thread for executing user interface drawing instructions in the current frame, wherein an operation action of the rendering thread precedes an operation action of the rendering hardware interface thread by one frame; Based on the mark of the rendering thread, detecting whether it is necessary to draw advanced graphic effects when drawing the user interface in the current frame; Based on the flag of the rendering hardware interface thread, it is detected whether drawing of advanced graphic effects is supported when drawing the user interface in the current frame.
6. The method according to claim 1, characterized in that The current display area structure that will be used to display the user interface in the current frame, configured as a render target of type backbuffer, including: Starting from the last pass of post-processing, the current display area structure is configured as a rendering target of the back buffer type.
7. The method according to claim 1, characterized in that Advanced graphic effects include: blur graphic effects, glitch graphic effects, and jitter graphic effects.
8. A user interface display device for Unreal Engine, characterized in that: Pre-configuring a display area structure for displaying graphics in a rendering hardware interface to be mapped to at least two frame buffers in a graphics application program interface; The at least two frame buffers include: a default frame buffer associated with a window system corresponding to a back buffer, and a user-defined custom frame buffer corresponding to a non-back buffer; the device includes: A special effects detection module, configured to detect whether it is necessary and supported to draw advanced graphic special effects when drawing the user interface in the current frame; A target configuration module configured to configure a current display area structure used to display the user interface in the current frame as a rendering target of a back buffer type if no advanced graphic effects need to be drawn or the advanced graphic effects are not supported when drawing the user interface in the current frame; The rendering and display module is configured to render the rendering target of the back buffer type and display the back buffer in the current frame to display a user interface that has been drawn in the current frame.
9. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, enables the electronic device to implement the method described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Computer-readable instructions are stored thereon, and when the computer-readable instructions are executed by a processor of a computer, the computer is caused to execute the method according to any one of claims 1 to 7.
