-
Notifications
You must be signed in to change notification settings - Fork 320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Weird Vsync behaviour #2913
Comments
I tested your blend. I couldn't produce the same weird behavior, and I tested with both v-sync enabled and disabled. I wonder if this is because I'm on Windows 11 which separates the Blender terminal as a separate process/application, unlike with Windows 10. |
I can confirm, on my Win11 laptop Vsync seems to work fine |
I also cannot confirm this issue on Windows 10. Armory reports exactly 2500 frames per second (this seems to be the maximum for my AMD RX 6700 XT GPU) and I can hear coil whine from my GPU which I only experienced with very high frame rates so far. Unfortunately, the AMD overlay doesn't seem to recognize the Armory game so I cannot see the frame rate as reported by the GPU. In my case I couldn't see the cube spinning as fast as in your video, also the script that is shown at the beginning of your video is missing. Maybe that's the reason why it works for RPaladin and me? Also make sure to check your GPU settings, at least AMD has a setting to enable vsync even if a game tells the GPU otherwise. |
The cube in my original .blend was spun via logic nodes. @MoritzBrueckner I don't fully understand, does the behaviour you describe happen when Vsync is en- or disabled? I have no Frame limiters, or any such things, enabled |
Hi, sorry for my late answer. Now with the new file I think I understand what you mean, although I still cannot reproduce the issue in the way you experience it. The debug console shows the average frame rate, which differs from what is reported in the Blender console by your script. However, even after changing the debug console to print the current (non-average) frame rate there are huge differences:
Note that the AMD overlay decreases frame times by a bit. I have no idea why full screen and VSync result in 60 fps for me... The debug console calculates the current (non-average) frame time as follows: How I modified the debug console (original source): ui.text("Frame");
ui.text('$avg ms / $fpsAvg fps', Align.Right);
ui.text('Current: ${Std.int(1 / frameTime)} fps', Align.Right); // added this line
What I mentioned above was with VSync disabled. Since Armory only passes a vsync flag to Kha, this is more likely a Kha issue I guess, can you reproduce your issue in a pure Kha application? |
Description
When Vsync is turned of, I expect the framerate to be uncapped. To test this I call the game update on render, as the FPS counter of the Debug View was shown to not be reliable. The FPS seems to be uncapped, but only if the window is not in Focus, and kha reports VSync to still be turned on. See the attached video. It is a bit hard to see due to the low frame rate, but the cube spins a lot faster when the window is not focused. If it were the other way around, the fps being unlocked while the game is in the background, everything would be fine.
This happens regardless if Vsync is enabled or not. All this is regarding Krom.
To Reproduce
Have a way to reliably measure FPS. and notice a difference beteween focused and unfocused window behaviour
System
Blender: 3.6.1LTS
Armory: current ArmSDK
OS: Win 10
Graphics card: GTX 1060
vsync.zip
The text was updated successfully, but these errors were encountered: