[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56226] trunk/blender/source/blender/ editors/space_view3d/view3d_project.c: fix [#34706] Projection precision is zoom dependent

Campbell Barton ideasman42 at gmail.com
Mon Apr 22 23:13:32 CEST 2013


Revision: 56226
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56226
Author:   campbellbarton
Date:     2013-04-22 21:13:30 +0000 (Mon, 22 Apr 2013)
Log Message:
-----------
fix [#34706] Projection precision is zoom dependent
ED_view3d_project_float functions were rounding the results.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_view3d/view3d_project.c

Modified: trunk/blender/source/blender/editors/space_view3d/view3d_project.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/view3d_project.c	2013-04-22 21:12:11 UTC (rev 56225)
+++ trunk/blender/source/blender/editors/space_view3d/view3d_project.c	2013-04-22 21:13:30 UTC (rev 56226)
@@ -144,8 +144,8 @@
 			if (((flag & V3D_PROJ_TEST_CLIP_WIN) == 0) || (fx > 0.0f && fx < (float)ar->winx)) {
 				const float fy = ((float)ar->winy / 2.0f) * (1.0f + (vec4[1] * scalar));
 				if (((flag & V3D_PROJ_TEST_CLIP_WIN) == 0) || (fy > 0.0f && fy < (float)ar->winy)) {
-					r_co[0] = floorf(fx);
-					r_co[1] = floorf(fy);
+					r_co[0] = fx;
+					r_co[1] = fy;
 
 					/* check if the point is behind the view, we need to flip in this case */
 					if (UNLIKELY((flag & V3D_PROJ_TEST_CLIP_NEAR) == 0) && (vec4[3] < 0.0f)) {




More information about the Bf-blender-cvs mailing list