Tagged: profiling
Common Causes of Bad Framerate in Student Environments
KNOWLEDGE IS POWER
Or put another way, without knowing the cause of your framerate issues, you will be stabbing the dark, throwing away heaps of time making “optimisations” which make no significant impact on your framerate.
Incidentally, this is a good read: https://docs.unrealengine.com/latest/INT/Engine/Rendering/PerformanceProfiling/Guidelines/index.html
IDENTIFY WHAT
- Turn on a framerate counter if you have not already done so. If your engine doesn’t have one, use FRAPS.
- Turn layers off and on to see which assets are affecting your framerate most.
- Try and pinpoint it to a specific asset if you can. The table below is sorted by likelihood, so this can give you a clue where to start looking.
UNDERSTAND WHY
Use the table below to figure out the reason that asset is hurting your framerate. Understand what is written. Google if the description is not sufficient.
APPLY RESOLUTION
Now we know what is hurting our frame rate and why, the resolution is usually simple. Apply the proper resolution. Profit.
Issue | Description | Common Causes / Diagnosis | Resolution |
Overdraw | When a single screen pixel has to be drawn many times. This can occur from bad sorting, or more typically from blend transparency |
|
|
Expensive dynamic lighting | In deferred lighting, each light has to essentially “overdraw” onto each screen pixel.In forward lighting, each light has to draw once per object it hits
|
|
|
Fill rate bound (shader cost) | Bulk of a frame is usually spent “colouring in” your pixels. This is a factor of the time it takes for your shader to be computer per pixel. This is usually a result of too many texture samples. |
|
|
Transform-bound (geometry cost) | If calculating the position of mesh vertices is taking longer than filling the pixels they pertain to, you are transform-bound. |
|
|
Out of memory | If you are out of memory, your engine may try and cope. Coping measures are usually crippling to performance. In other cases, your game will simply crash. |
|
|