Vivecraft / VivecraftMod

An experimental port of Vivecraft to Forge/Fabric
Other
162 stars 33 forks source link

FPS loss when window is focused #265

Open RedstoneGithub opened 3 months ago

RedstoneGithub commented 3 months ago

When playing the Fabric version of this mod (v1.20.4-1.1.8) and Sodium/Iris, I lose about 20 fps if the Minecraft window is focused on my desktop. When not focused, I get around 90 FPS, but cant use any GUI controls. When focused its less than 70, sometimes in the 50s. Haven't tested any other versions yet. This is through virtual desktop on quest 3. 3080/i9 9900k

fayer3 commented 3 months ago

window focus should be irrelevant, the window just can't be minimized to use the gui

fayer3 commented 3 months ago

and can you post a latest.log

Techjar commented 3 months ago

Do you have the window set to fullscreen?

RedstoneGithub commented 3 months ago

It occurred in both fullscreen and windowed, I don't have Gsync on for windowed mode, and minecraft vsync is off. In windowed though you have to minimize it to get the 20-30 fps back, but again there's no GUI control. I have the render res to 1804x1867. latest.log is here: https://mclo.gs/jfYDgUV is there a way for VR control to work while the screen is minimized? that might solve this issue

Techjar commented 3 months ago

No we can't fix that, it has to do with the window size being considered 0x0 when minimized, causing the mouse to have no valid coordinates. But you shouldn't have worse performance when the window is focused. Smells of some Windows scheduling feature misbehaving.