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:
authorCampbell Barton <ideasman42@gmail.com>2013-01-07 07:29:03 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-01-07 07:29:03 +0400
commit2f23267797700ec001a7a447ee4b7d4344a2419a (patch)
tree8cb3e199a018e7d400c8ebd72261b921b4ba8c38 /source/blender/editors/space_view3d/view3d_draw.c
parent6747dec926ded010641cef37bd4384fff15dc961 (diff)
compare normalized vectors when calculating the view horizon
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_draw.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 202b5befa01..ec4b28f3fe5 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -3051,8 +3051,8 @@ static void view3d_main_area_draw_objects(const bContext *C, ARegion *ar, const
const float xf = (float)x / (float)(XTOT - 1);
const float yf = (float)y / (float)(YTOT - 1);
const float mval[2] = {xf * (float)ar->winx, yf * ar->winy};
+ const float z_up[3] = {0.0f, 0.0f, 1.0f};
float out[3];
- const float up[3] = {0.0f, 0.0f, 1.0f};
GLubyte *col_ub = grid_col[x][y];
float col_fac;
@@ -3070,10 +3070,10 @@ static void view3d_main_area_draw_objects(const bContext *C, ARegion *ar, const
}
else {
if (scene->world->skytype & WO_SKYREAL) {
- col_fac = fabsf((angle_v3v3(up, out) / (float)M_PI) - 0.5f) * 2.0f;
+ col_fac = fabsf((angle_normalized_v3v3(z_up, out) / (float)M_PI) - 0.5f) * 2.0f;
}
else {
- col_fac = 1.0f - (angle_v3v3(up, out) / (float)M_PI);
+ col_fac = 1.0f - (angle_normalized_v3v3(z_up, out) / (float)M_PI);
}
}