CaffeineMC / sodium

A Minecraft mod designed to improve frame rates and reduce micro-stutter
Other
4.77k stars 811 forks source link

Try to fix the fps drop from mouse movements #2742

Closed Pan4ur closed 1 month ago

Pan4ur commented 1 month ago

Request Description

I noticed that in vanilla Minecraft when you move the mouse the fps drops a lot. Here is a video:

https://github.com/user-attachments/assets/e4718e59-51a8-4605-a94f-b7cbc9af8ec3

asumagic commented 1 month ago

This is expected, when you're standing still the renderer has much less work to do to update culling and you become CPU-limited. Your video is of vanilla minecraft; Sodium already improves upon this, and there is ongoing work to improve it further.

Pan4ur commented 1 month ago

Please look at the second half of the video, the fps changes just from mouse movements, not from camera rotation. This also happens with Sodium for Fabric

Stupefacient commented 1 month ago

The second frame drop is normal windows actives because your switching from rendering single a single application to multiple in boardless window mode.

Please look at the second half of the video, the fps changes just from mouse movements, not from camera rotation. This also happens with Sodium for Fabric

Felix14-v2 commented 1 month ago

the fps changes just from mouse movements, not from camera rotation

Are you able to reproduce this in fullscreen with only Sodium installed? You can use F3+Esc to make the mouse cursor visible

UPD: can reproduce

Andarwinux commented 1 month ago

If sodium eventually implemented the DXGI swapchain, this problem could be mitigated by MPO windowed independent flip.

jellysquid3 commented 1 month ago

We already have an issue open about using DXGI Presentation (#2361), which probably would resolve this problem.