Does Unity limit maximum frame rate? (Just curious)

Using two different FPS Counters which render on screen (one using Unity’s Time class and another using System.Diagnostics.Stopwatch) and testing on 5 different PC’s (different processors / video cards) with an empty scene (just the fps counter script) I get 1111.11 fps on all of them (regardless of resolution / quality settings).

Setting Application.targetFrameRate = 60; Does limit the frame rate to 60.xx. Setting it to 2000 still limit it to 1111.11 and setting to -1 (default) still capped at 1111.11.

Does Unity internally limit the maximum update speed?

P.S. I am not asking because I want a higher frame rate. I am just curious about all PC’s getting the same results.

1 Like

If those are the results you got. I would think so. I don’t know much about it but if the engine itself was open source then maybe it could possibly be lifted but it won’t be recommended. I don’t know much about the internals of the engine but that for an engine developer to answer.

Also personally I don’t think there wouldn’t be a need for a frame rate higher than 120 frames per second. The human eye and brain only needs a minimum of 15 frames per second to visualize motion as a ‘seamless’ animation. Someone can correct me, which is also why a common refresh rate is 30 frames per second and 60 is optimal and anything higher can possibly cause issues to person playing such a game.

I doubt anyone would need something over 1111 FPS in the first place.

As I said, I am asking out of curiosity (trying to understand why I get those results) not because I seek a higher frame rate.

1 Like

This is outta the air but possibly the highest number of frames within a render process, if that makes sense, for example from the time OnAwake() is executed to LateUpdate()?

It does not.

Do you have v-sync turned on, or not?

V-sync is off. 1111.11 FPS with v-sync on would be a huge bug :slight_smile:

Try any FPS Counter with an empty scene (v-sync off) and report what your max FPS is?

I have run 3 frame counters (even Unity’s Frame Counter included with Angry Bot) caps out at 1111.11 fps.

A lot of SDL tutorials include this little gem for frame-rate calculation:

frameTime = SDL_GetTicks() - frameStartTime;
if (frameTime != 0)
    fps = 1000.0f / frameTime;
else
    fps = 1111.11f;

I’d guess that what you’re seeing is a catch for divide-by-zero errors as the frame rate goes over 1000 fps (> 1 frame per millisecond tick).