- Home /
Motion stuttering, gfx.WaitForPresent, high fps, external position
Hello,
I have a problem with graphics jittering for framerates <200fps (or so). I am using Windows 7 and Unity Pro (4 and 5).
I have a somehow complex scenario (but stable at well above the monitor refresh rate, 60 fps).
The only camera in the scene is supposed to spin at constant speed.
Problem: The camera jitters, even with V-Sync on/off, even with double V-Sync on/off, even in Editor, in Standalone, Fullscreen, Fastest Mode, Fanstastic Mode, in Nvidia, ATI with CrossFireX...)
In order to make sure that the problem does not come from the physics calculations, the Spin.cs script does the following:
using UnityEngine;
using System.Collections;
public class Spin : MonoBehaviour {
public float speed;
System.Diagnostics.Stopwatch stopwatch;
void Start ()
{
stopwatch = new System.Diagnostics.Stopwatch();
stopwatch.Start();
}
void Update()
{
transform.rotation = Quaternion.AngleAxis(stopwatch.ElapsedMilliseconds*speed*0.360f,transform.up);
}
}
The position for each frame is given by the system's timestamp (in my actual project the position comes from another program, not Unity), which is independent of the frame rate.
What I don't understand is why the camera jitters, since its orientation is given by the most absolute of sources I can have (in a non real-time operating system).
I attach a profiler screenshot (the framerate is well over 60 fps) with odd spikes of gfx.WaitForPresent (even when V-Sync is NOT active and shadows are OFF) Profiler Screenshot
Am I the only one with this problem?
Thanks!!