More on the Mouse Lag Issue


The mouse lag issue [1][2] for Direct3D games is a known issue and can be seen in many Direct3D renderable games such as Halflife, UT, etc. [3][4][5]

The lag is due to the buffering that your video card is doing. Since they have eliminated any synchronization calls in the video card instruction buffer, it keeps on taking input from the CPU until the buffer is full. So your video card at any point in time may be rendering a frame that you fed it 1-3 frames beforehand, which would explain the mouse lags when at lowered framerates. In this way the CPU (via mouse events) is lagged from what is seen on the screen. [6][7]

Okay so why dont you see this in Single Player? In single player the game speed is slowed as your FPS drops, so the events take the same number of frames and appear smooth. This is typically done on every SP console game also. This effectively means that your CPU is slowed to be in sync. with your GPU. In MP this CANNOT happen, since time is constant and global (otherwise one client would time-lag the whole server, although this happens on listen servers 😉 ).


ATI acknowledge the problem and their fix for Direct3D games with mouse lag is…. to use OpenGL or software rendering 🙂..unless the developer forces GPU-CPU sync. themselves at the point of rendering rather than pre-rendering. This is effectively removing the pre-rendering buffer as we do in the fix. <- Unreal <- Halflife (NOTE: In OpenGL you can call glFinish() to synchronise CPU and GPU after each frame. Most OpenGL games have this option) NVIDIA offer some advice to developers on the subject in their developer FAQ.

Saying The most obvious solution would be to lock the back buffer for each frame in Direct3D, which is essentially fix presented on Pkeuro. This ensures that all pending graphics commands are completed by the GPU before the CPU moves on..

Thats why UT2003/4 had to resort having a reduce mouse lag options which is basically forces syncronisation between the CPU and the GPU, overriding the pre-rendering buffer limit.

The pkeuro fix will work for Direct3D games for this reason. You may experience a slight FPS drop, since nvidias need for a large amount of pre-rendering is based on the fact their pre-rendering code is not optimised for D3D so much. That said fps-lag is much more playable than mouse-lag.


Click Here.


[1] Savage General
[2] ESR
[3] Battlezone 2
[4] Unreal
[5] ElderScrolls
[6] Developer Forum #1
[7] Developer Forum #2

Leave a Reply