Page MenuHome

Fix T60328: Stereoscopy Convergence Plane broken

Authored by Dalai Felinto (dfelinto) on Jan 12 2019, 12:45 AM.



The original issue is that we were changing the camera shiftx
temporarily for the stereoscopic calculation. However we are using the
evaluated object when calculating the projection matrix.

Note: Camera framing drawing for stereo still seems to be broken.
But the viewport itself is now correct.

Drawing API: shgroup_instance and shgroup_instance_alpha clarification

shgroup_instance_alpha was getting a color[4] but would only use the
alpha defined upon creation of the shading group.

This was very limiting since it wouldn't allow for different instances
to have different alpha values.

Patch made with Clément Foucault (he made the code of it, while I fixed
all the parts of the code that were relying on shgroup_instance_alpha.

BKE_camera_multiview_model_matrix: Add _scaled version

For drawing it is useful to have the non-normalized version of the matrix.
So we can scale up the cameras drawing accordingly.

Viewport: Stereoscopy drawing is back

The viewport stereoscopy support helpers are finally ported to 2.80.

We now can scale the camera and the "stereo cameras" will scale
in the viewport as well (unlike 2.7x).

At the moment I disabled the drawing of the camera frame when
stereo is selected and you are looking through the camera.

It is to be fixed later, but for now it draws the border wrong.
In 2.79 this was not a problem because the camera frame was drawn
afterwards as a hack.

Viewport > Stereoscopy:

  • Cameras
  • Convergence plane
  • Convergence plane alpha
  • Stereoscopy volume
  • Stereoscopy volume alpha

Diff Detail

rB Blender
dev-stereo (branched from master)
Build Status
Buildable 2722
Build 2722: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Jan 12 2019, 12:48 AM

Committed as:

  • ce3475f7479
  • ba89b69ebdb
  • 9f6e09bd8c1