Lanczos Filter

58 views
Skip to first unread message

vector...@gmail.com

unread,
Jun 16, 2018, 6:51:53 PM6/16/18
to pbrt
Hi,

Shouldn't the line number 259 in the texture.cpp for the Lanczos filter be:     Float s = std::sin(x / tau) / (x / tau); instead of     Float s = std::sin(x * tau) / (x * tau); ?


 
 

Matt Pharr

unread,
Jan 2, 2019, 5:26:02 PM1/2/19
to pbrt
I believe that is actually correct (though it's admittedly confusing): the Lanczos() function there expects to be passed an x value in [-1, 1] (note that the calling code divides by filterwidth). In turn, that s variable there is the sinc filter itself, which we'd like to have span a few cycles, and the "lanczos = std::sin(x) / x" variable is the Lanczos window.

This is admittedly confusing and not at all clear if you just look at the Lanczos() function. I've made a note to clean that up to be a little more standard in the next edition.

Thanks,
Matt


On Sat, Jun 16, 2018 at 3:51 PM <vector...@gmail.com> wrote:
Hi,

Shouldn't the line number 259 in the texture.cpp for the Lanczos filter be:     Float s = std::sin(x / tau) / (x / tau); instead of     Float s = std::sin(x * tau) / (x * tau); ?


 
 

--
You received this message because you are subscribed to the Google Groups "pbrt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pbrt+uns...@googlegroups.com.
To post to this group, send email to pb...@googlegroups.com.
Visit this group at https://groups.google.com/group/pbrt.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages