[Bf-blender-cvs] [553ec98] master: Revert "Cycles: Implement Mitchell-Netravali pixel filter"

Sergey Sharybin noreply at git.blender.org
Wed Oct 22 18:55:23 CEST 2014


Commit: 553ec988e7a44046c86ec1528c357269e4f23f7f
Author: Sergey Sharybin
Date:   Wed Oct 22 22:52:04 2014 +0600
Branches: master
https://developer.blender.org/rB553ec988e7a44046c86ec1528c357269e4f23f7f

Revert "Cycles: Implement Mitchell-Netravali pixel filter"

As it appears we can't really use mitchell filter together with the
current filter importance sampling,

This reverts commit 742911314322e5dae3a07469d0ca53b61427f978.

===================================================================

M	intern/cycles/blender/addon/properties.py
M	intern/cycles/render/film.cpp
M	intern/cycles/render/film.h

===================================================================

diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py
index 7524fe3..05a6f70 100644
--- a/intern/cycles/blender/addon/properties.py
+++ b/intern/cycles/blender/addon/properties.py
@@ -54,7 +54,6 @@ enum_bvh_types = (
 enum_filter_types = (
     ('BOX', "Box", "Box filter"),
     ('GAUSSIAN', "Gaussian", "Gaussian filter"),
-    ('MITCHELL', "Mitchell-Netravali", "Mitchell-Netravali filter"),
     )
 
 enum_aperture_types = (
diff --git a/intern/cycles/render/film.cpp b/intern/cycles/render/film.cpp
index 76a92d3..19f959d 100644
--- a/intern/cycles/render/film.cpp
+++ b/intern/cycles/render/film.cpp
@@ -198,29 +198,6 @@ static float filter_func_gaussian(float v, float width)
 	return expf(-2.0f*v*v);
 }
 
-static float filter_func_mitchell(float v, float width)
-{
-	(void)width;  /* Ignored. */
-
-	/* B = 1,   C = 0   - cubic B-spline */
-	/* B = 1/3, C = 1/3 - recommended */
-	/* B = 0,   C = 1/2 - Catmull-Rom spline */
-	const float B = 1.0f / 3.0f;
-	const float C = 1.0f / 3.0f;
-
-	const float ax = fabsf(v);
-	if (ax < 1.0f) {
-		return ((12.0f - 9.0f * B - 6 * C) * ax * ax * ax +
-		        (-18.0f + 12.0f * B + 6.0f * C) * ax * ax +
-		        (6.0f - 2.0f * B)) / 6.0f;
-	} else if ((ax >= 1.0f) && (ax < 2.0f)) {
-		return ((-B - 6.0f * C) * ax * ax * ax +
-		        (6.0f * B + 30.0f * C) * ax * ax + (-12.0f * B - 48.0f * C) *
-		        ax + (8.0f * B + 24.0f * C)) / 6.0f;
-	}
-	return 0.0f;
-}
-
 static vector<float> filter_table(FilterType type, float width)
 {
 	const int filter_table_size = FILTER_TABLE_SIZE-1;
@@ -236,9 +213,6 @@ static vector<float> filter_table(FilterType type, float width)
 		case FILTER_GAUSSIAN:
 			filter_func = filter_func_gaussian;
 			break;
-		case FILTER_MITCHELL:
-			filter_func = filter_func_mitchell;
-			break;
 		default:
 			assert(0);
 	}
diff --git a/intern/cycles/render/film.h b/intern/cycles/render/film.h
index 31cc769..cc7183b 100644
--- a/intern/cycles/render/film.h
+++ b/intern/cycles/render/film.h
@@ -30,8 +30,7 @@ class Scene;
 
 typedef enum FilterType {
 	FILTER_BOX,
-	FILTER_GAUSSIAN,
-	FILTER_MITCHELL,
+	FILTER_GAUSSIAN
 } FilterType;
 
 class Pass {




More information about the Bf-blender-cvs mailing list