OpenImageIO/oiio — pull request #422 by lgritz (2012-08-16 21:27:52+00:00)
Title: Texture blur fixes

After recent textur blur changes were committed, we noticed a few appearance flaws. There were basically two problems:

1. There were certain cases of oddball derivatives that led to NaN or Inf values in some of the ellipse parameters. This was the case all along, but the slightly different logic before for where to place samples was not sensitive to it. A couple well-placed clamps and changes in < vs > tests clears that up.

2. I was seeing examples of aliasing in repetitive patterns in highly anisotropic regions. Turns out that this was due to our shortcut of nsamples=ceil(aspect-0.3), which we thought was a good time vs quality compromise, but there are cases where it doesn't look good. The solution is to use the theoretically correct nsamples=floor(2*aspect-1). It costs slightly more for highly anisotropic samples, but it avoids the ugly aliasing. In truth, I don't see any visual difference on some production frames I tried, but it turned up in some renderer testsuite images, so I bet it's only a matter of time before it's a real problem, so may as well fix it.