Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoward Trickey <howard.trickey@gmail.com>2021-10-30 22:37:05 +0300
committerHoward Trickey <howard.trickey@gmail.com>2021-10-30 22:37:05 +0300
commite9bbfd0c8c7a508d220bf355722ff03f91e93183 (patch)
tree1230f26bc82f24547aeccbaa7fcd6d3db2655fd3 /source/blender/editors/space_view3d/view3d_view.c
parent1aa953bd1913c81b22c80a00edbf4ad88a32c52f (diff)
parent03a962d8cab44221650f59eb223cb0a767e05b2b (diff)
Merge branch 'master' into soc-2020-io-performancesoc-2020-io-performance
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_view.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_view.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index f5da7c14a88..46a664f10fa 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -1730,7 +1730,12 @@ void ED_view3d_xr_shading_update(wmWindowManager *wm, const View3D *v3d, const S
if (v3d->runtime.flag & V3D_RUNTIME_XR_SESSION_ROOT) {
View3DShading *xr_shading = &wm->xr.session_settings.shading;
/* Flags that shouldn't be overridden by the 3D View shading. */
- const int flag_copy = V3D_SHADING_WORLD_ORIENTATION;
+ int flag_copy = 0;
+ if (v3d->shading.type !=
+ OB_SOLID) { /* Don't set V3D_SHADING_WORLD_ORIENTATION for solid shading since it results
+ in distorted lighting when the view matrix has a scale factor. */
+ flag_copy |= V3D_SHADING_WORLD_ORIENTATION;
+ }
BLI_assert(WM_xr_session_exists(&wm->xr));