Measuring rendering performance in Unreal Engine 4

The basic performance metrics are frame rate, and its inverse, milliseconds per frame.

A key decision that you have to make is the frame rate at which your application should run. Having established that, everything you do should be geared towards achieving that frame rate and maintaining it: your settings, your content, your code.

The Shader Complexity view mode renders the scene with a color visualization of the cost in number of instructions of computing each pixel in the pixel shader, from green/cheap to red/expensive to white/extremely-expensive.

Shader complexity view mode

Shader complexity visualization

Complexity is influenced by very many factors: the number of translucent layers, the number and complexity of the materials assigned to meshes, the polygon count of the meshes, the number of meshes and the number of draw calls made, and whether you use dynamic shadows.

Translucency is expensive. Say you have multiple overlapping planes with translucent colors that move up and down, back and forth. The recalculation of the color of each pixel on every frame is extremely expensive, as shown by the shader complexity visualization. The FPS is low.

Evidence that this cost is per pixel is that when you dolly the camera back, thus reducing the number of pixels occupied by the overlapping translucent planes, the FPS increases.

Multiple overlapping translucent planes

Shader complexity visualization of overlapping translucent planes

Many more overlapping translucent planes

Fewer expensive pixels when the camera dollies back

Materials can be very expensive too. Pixels of meshes with complex materials are more expensive to compute. Meshes with multiple materials too.

The more pixels of the frame that a mesh with a complex material covers, the lower the frame rate becomes. When the camera dollies into a model with a complex material, the FPS decreases.

A complex material

A mesh with that complex material

Shader complexity of that frame

A frame gets rendered mesh by mesh, draw call by draw call. Pixels get recomputed over and over as each mesh gets drawn. The more meshes you have in view, the more draw calls are made, and the lower the FPS becomes.

A scene with many meshes

Dynamic shadows have a huge cost as well. The higher the polygon count in the scene, the more expensive it is to compute dynamic shadows.

For more, see Introducing the Principles of Real-time, unrealengine.com.