In
a new Gamasutra feature, contributor Guillaume Gouraud gives a primer on handling the trend towards stereoscopic 3D gaming from a game programming perspective.
After giving a basic introduction to various forms of stereoscopic 3D displays -- from ones using filtered lenses to glasses-free auto-stereoscopic screens -- Gouraud details two different programming techniques for generating the two slightly different images needed to generate a stereoscopic output.
The first, 2D + depth rending, judges the depth of objects in a game scene and then generates a second point-of-view for that object using a per-pixel displacement.
This technique, which has been used in
Enslaved: Odyssey to the West and
Batman Arkham Asylum: GOTY edition, is relatively painless from a processing point-of-view, but places at upper limit on the depth-of-field effect that can be achieved.
Dual rendering, on the other hand, uses two virtual cameras to generate the two unique views needed for a stereoscopic 3D effect.
This method generates the most authentic 3D effect, as seen in titles like
Killzone 3 and
Gran Turismo but requires the game engine to effectively render twice as many images as a 2D scene, which can cause runtime processing problems, especially on lower-powered consoles.
The complete feature goes in to more detail on how each of these rendering processes works, and what developers can expect from the stereoscopic 3D market.