Utilizing Three.js alongside Nvidia's 3D Vision shutter technology has been an interesting experience for me. In my rendering process, I have implemented the following steps:
// Setting up the 3D Vision Camera (Shutter Glasses)
var eye_separation = 0.03; // adjusting based on individual eye distance
var cam_toggle = true;
function animate() {
// Activating 3D Vision
if (cam_toggle) {
camera.position.x += eye_separation;
cam_toggle ^= 1;
} else {
camera.position.x -= eye_separation;
cam_toggle ^= 1;
}
renderer.render(scene, camera);
requestAnimationFrame(animate);
}
My observations have led me to realize that the GPU's frame refresh rate syncs perfectly with the shutter glasses. By toggling the camera between specific views along the x-axis, I am able to achieve a convincing stereoscopic effect. Although Nvidia recommends using a frame buffer to switch between views, I have chosen not to do so. However, I am encountering an issue where I am only achieving a maximum of 60 fps while working with a 120 Hz projector. How can I optimize the rendering process to reach 60 fps for each view, thus achieving a combined rate of 120 fps?