UDN
Search public documentation:
GPUProfilingHome
日本語訳
中国翻译
한국어
Interested in the Unreal Engine?
Visit the Unreal Technology site.
Looking for jobs and company info?
Check out the Epic games site.
Questions about support via UDN?
Contact the UDN Staff
中国翻译
한국어
Interested in the Unreal Engine?
Visit the Unreal Technology site.
Looking for jobs and company info?
Check out the Epic games site.
Questions about support via UDN?
Contact the UDN Staff
UE3 Home > Performance, Profiling, and Optimization > GPU Performance and Profiling
GPU Performance and Profiling
Overview
Pixel Shading
Overdraw
Translucent materials can be a huge issue for GPU performance because of the overlapping of multiple translucent materials, or overdraw. In general, you want to limit the amount of screenspace any translucent materials are taking up at any time, especially when multiple translucent materials can be overlapping. Particle systems are a big contributor in this area. Materials used for particles are usually translucent, and with many particles being drawn in any one system, there is a massive potential for overdraw. Some tips for limiting overdraw from particles are listed below:- Fewer Complex Particles - It is better for performance to have a particle system that uses fewer complex particles than to have numerous simple particles. If an effect created by numerous particles can be created in the material and applied to a single particle that is preferable.
- Limit Screenspace Coverage - If you can limit the amount of space any particle effect takes up on screen, that limits the impact of the overdraw from the effect.
- Limit Overlapping of Effects - Overlapping of multiple effects amplifies the overdraw impact of any single effect. If possible, detect when multiple effects need to be spawned in the same location and only spawn a single effect instead.
Opacity Masking
Masked materials can be a source of wasted GPU performance because each pixel of the surface of the geometry must be evaluated regardless of whether it ends up being visible. To minimize the amount of overhead of a masked material, there are some optimizations that can be made.- Match Geometry to Visible Material Area - It is actually more efficient to add extra detail to the mesh to make it more closely match the visible area of the material being applied to it than to use simple geometry with tons of wasted pixels.
- Remove Specular - Unless it is absolutely necessary, masked materials should remove any specular component to make the calculation of the wasted pixels as simple as possible.
- Use Non-Directional Lighting - Using non-directional lighting can lighten the instructions needed to calculate the lighting for the wasted pixels, resulting in faster performance.
Dynamic Lighting
Dynamic Shadows
SHOW DYNAMICSHADOWS
console command. It is advisable to bind a key to this command, so that while the key is pressed dynamic shadows are turned off and then enabled again when the key is released. This can be done from the console - for example: SETBIND F SHOW DYNAMICSHADOWS | ONRELEASE SHOW DYNAMICSHADOWS
.
For Actors created in UnrealScript we want to make use of ShadowParenting. This basically means that one actor can have LOTS of attachments but there is only one Dynamic Shadow cast. When you have a Pawn with a weapon, a helmet, a backpack, and some other attachments you want have all of the "attachments" shadow parented to the pawn itself. You do that by: Attachment.SetShadowParent(Parent.Mesh)
Performance limitations with dynamic shadows
The GPU cost of shadow buffers is directly proportional to the screenspace size of the shadow frustum. This means a nearby character using shadow buffers is much more expensive than a far away one. It also means that a large object casting a dynamic shadow buffer shadow is much more expensive than a small one. See the Shadow Buffer Filtering Options page for more details. Also see the Shadowing Reference page and Modulated Shadows page for more shadow optimizations.View Modes
Shader Complexity
The shader complexity view mode colors the scene based on how many pixel shader instructions were required to shade each pixel. Red means very expensive, green means very cheap. Notice that the translucent light shafts add cost to the cheap opaque materials behind them.
Light Complexity
The light complexity view mode colors the scene based on how many dynamic lights are affecting the surfaces. Black means no dynamic lights affecting. Various colors/shades, from green to red, show increasing amounts of dynamic lights affecting. The goal is always to have the entire level display as black, though that is obviously not always possible.
Detail Modes
