Skip to content

Conversation

@mrdoob
Copy link
Owner

@mrdoob mrdoob commented Nov 21, 2025

Related issue: #32317

Description

The webgl_effects_stereo example uses a scene with a very large scale (objects distributed within a range of 10,000 units, camera at z=3200). The default StereoCamera parameters (eyeSep = 0.064, focus = 10) were too small relative to this scale, resulting in a negligible parallax that made the stereo effect invisible.

This PR adjusts the parameters to match the scene scale:

  • Sets camera.focus = 3200 to match the distance to the center of the scene.
  • Sets effect.setEyeSeparation( 100 ) to provide a visible stereo baseline.

For testing:
https://raw.githack.com/mrdoob/three.js/effects-stereo/examples/webgl_effects_stereo.html

(Made using https://antigravity.google/ with Gemini 3.0)

@mrdoob mrdoob added this to the r182 milestone Nov 21, 2025

camera = new THREE.PerspectiveCamera( 60, window.innerWidth / window.innerHeight, 1, 100000 );
camera.position.z = 3200;
camera.focus = 3200;
Copy link
Collaborator

@Mugen87 Mugen87 Nov 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about do it the other way around and scale the scene down to real-world units?

Instead of having spheres with 100m radius let's decrease it by factor 1000 so the radius is 0.1 and then adjust the camera accordingly.

const geometry = new THREE.SphereGeometry( 0.1, 32, 16 );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants