[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49941] trunk/blender/source/blender: use filtersize of 1.0 for distort and uv - compositor nodes.

Campbell Barton ideasman42 at gmail.com
Thu Aug 16 18:07:01 CEST 2012


Revision: 49941
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49941
Author:   campbellbarton
Date:     2012-08-16 16:07:00 +0000 (Thu, 16 Aug 2012)
Log Message:
-----------
use filtersize of 1.0 for distort and uv - compositor nodes.
Experimenting here and 0.765625f is too sharp, but 1.0 wont blur with 0 distorted pixels but gives nice interpolation otherwise.

Modified Paths:
--------------
    trunk/blender/source/blender/compositor/intern/COM_MemoryBuffer.cpp
    trunk/blender/source/blender/editors/space_view3d/drawobject.c

Modified: trunk/blender/source/blender/compositor/intern/COM_MemoryBuffer.cpp
===================================================================
--- trunk/blender/source/blender/compositor/intern/COM_MemoryBuffer.cpp	2012-08-16 14:48:43 UTC (rev 49940)
+++ trunk/blender/source/blender/compositor/intern/COM_MemoryBuffer.cpp	2012-08-16 16:07:00 UTC (rev 49941)
@@ -283,7 +283,14 @@
 	// Use a different radius based on interpolation switch, just enough to anti-alias when interpolation is off,
 	// and slightly larger to make result a bit smoother than bilinear interpolation when interpolation is on
 	// (minimum values: const float rmin = intpol ? 1.f : 0.5f;)
+
+	/* note: 0.765625f is too sharp, 1.0 will not blur with an exact pixel sample
+	 * useful to avoid blurring when there is no distortion */
+#if 0
 	const float rmin = ((sampler != COM_PS_NEAREST) ? 1.5625f : 0.765625f) / ff2;
+#else
+	const float rmin = ((sampler != COM_PS_NEAREST) ? 1.5625f : 1.0f     ) / ff2;
+#endif
 	imp2radangle(A, B, C, F, &a, &b, &th, &ecc);
 	if ((b2 = b * b) < rmin) {
 		if ((a2 = a * a) < rmin) {

Modified: trunk/blender/source/blender/editors/space_view3d/drawobject.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/drawobject.c	2012-08-16 14:48:43 UTC (rev 49940)
+++ trunk/blender/source/blender/editors/space_view3d/drawobject.c	2012-08-16 16:07:00 UTC (rev 49941)
@@ -6550,7 +6550,10 @@
 	r_ob_wire_col[3] = 255;
 }
 
-/* flag can be DRAW_PICKING	and/or DRAW_CONSTCOLOR, DRAW_SCENESET */
+/**
+ * main object drawing function, draws in selection
+ * \param dflag (draw flag) can be DRAW_PICKING and/or DRAW_CONSTCOLOR, DRAW_SCENESET
+ */
 void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short dflag)
 {
 	static int warning_recursive = 0;




More information about the Bf-blender-cvs mailing list