[Aqsis-commits] SF.net SVN: aqsis: [1832] branches/texfiltering/aqsis/texturing/texlib/ ewafilter.c
Brought to you by:
ltatkinson,
pgregory
From: <c4...@us...> - 2007-12-28 05:23:00
|
Revision: 1832 http://aqsis.svn.sourceforge.net/aqsis/?rev=1832&view=rev Author: c42f Date: 2007-12-27 21:22:31 -0800 (Thu, 27 Dec 2007) Log Message: ----------- * Fix bug in filter truncation algorithm - the transpose was in the wrong position. Also increase the prefilter variance a bit to reduce aliasing. Modified Paths: -------------- branches/texfiltering/aqsis/texturing/texlib/ewafilter.cpp Modified: branches/texfiltering/aqsis/texturing/texlib/ewafilter.cpp =================================================================== --- branches/texfiltering/aqsis/texturing/texlib/ewafilter.cpp 2007-12-28 05:19:42 UTC (rev 1831) +++ branches/texfiltering/aqsis/texturing/texlib/ewafilter.cpp 2007-12-28 05:22:31 UTC (rev 1832) @@ -71,13 +71,13 @@ // check one inequality here. if(maxAspectRatio*maxAspectRatio*eig2 < eig1) { - Aqsis::log() << "aspect ratio = " << eig2/eig1 << "\n"; + //Aqsis::log() << "aspect ratio = " << eig2/eig1 << "\n"; // Need to perform eccentricity clamping SqMatrix2D R = covariance.orthogDiagonalize(eig1, eig2); // By construction, covariance = R^T * D * R, where D = SqMatrix2D(eig1, eig2); // here we modify the diagonal matrix D to replace eig2 with something larger. - covariance = R.transpose() * SqMatrix2D(eig1, - eig1/(maxAspectRatio*maxAspectRatio)) * R; + covariance = R * SqMatrix2D(eig1, + eig1/(maxAspectRatio*maxAspectRatio)) * R.transpose(); } } @@ -104,7 +104,7 @@ const TqFloat reconsVar = 1.3/(2*M_PI); // "Prefilter" variance - this is the variance of the antialiasing filter // which is used immediately before resampling onto the discrete grid. - const TqFloat prefilterVar = 1.3/(2*M_PI); + const TqFloat prefilterVar = 2.0/(2*M_PI); // Construct the covariance matrix, coVar. // // Note: This looks slightly different from Heckbert's thesis, since This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |