diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2019-03-06 16:07:51 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2019-03-06 16:59:32 +0300 |
commit | 3fc7d51ed3d3e42a67a07a7be686907358fcd872 (patch) | |
tree | baf2ed294ecbe5afd0a927a3e19e629859137338 /source/blender/draw | |
parent | f1fef41863bc42c070e431c4e65247ac5ed69ff6 (diff) |
Viewport: Fix stereoscopy volume "wires" not showing
This is unreported. When using volume opacity 0.0, the wires were not visible
(nor were they in other cases, but this was the most obvious one).
The volume itself is still glitchy, and slightly worse than 2.79. I
still don't know how to fix this though. It seems a common problem
(see T62262).
Diffstat (limited to 'source/blender/draw')
-rw-r--r-- | source/blender/draw/modes/object_mode.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c index 0fa4d328ebd..e5a98d4227b 100644 --- a/source/blender/draw/modes/object_mode.c +++ b/source/blender/draw/modes/object_mode.c @@ -1790,7 +1790,7 @@ static void camera_stereo3d( static float one = 1.0f; float color_volume[3][4] = {{0.0f, 1.0f, 1.0f, v3d->stereo3d_volume_alpha}, {1.0f, 0.0f, 0.0f, v3d->stereo3d_volume_alpha}, - {0.0f, 0.0f, 0.0f, 0.0f}}; + {0.0f, 0.0f, 0.0f, 1.0f}}; for (int eye = 0; eye < 2; eye++) { float winmat[4][4], viewinv[4][4], viewmat[4][4], persmat[4][4], persinv[4][4]; @@ -1803,7 +1803,9 @@ static void camera_stereo3d( mul_m4_m4m4(persmat, winmat, viewmat); invert_m4_m4(persinv, persmat); - DRW_shgroup_call_dynamic_add(sgl->camera_stereo_volume, color_volume[eye], &one, persinv); + if (v3d->stereo3d_volume_alpha > 0.0f) { + DRW_shgroup_call_dynamic_add(sgl->camera_stereo_volume, color_volume[eye], &one, persinv); + } DRW_shgroup_call_dynamic_add(sgl->camera_stereo_volume_wires, color_volume[2], &one, persinv); } } |