{"issue":{"created_at":"2011-11-18T06:40:10Z","state":"open","updated_at":"2011-11-18T18:59:47Z","user":{"gravatar_id":"111a547318ffe0b6f30e9978ee8f908f","id":504179,"url":"https://api.github.com/users/lgritz","login":"lgritz","avatar_url":"https://secure.gravatar.com/avatar/111a547318ffe0b6f30e9978ee8f908f?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"comments":5,"body":"Fix aniso footprint estimation for very-small-deriv case.\r\n\r\nBecause the more correct estimate for the filter footprint goes awry if\r\nF is very small (caused by extremely tiny derivatives), we tested this\r\nand if true, set the major axis to the bigger of the two derivative\r\nestimates, and the minor axis to be 1e-8.\r\n\r\nThe problem is that that the mip level is determined by the minor axis,\r\nso this means that all texture lookups falling into this case end up\r\nsampling the highest-res MIPmap level.  That's bad for cache coherence,\r\nand to add insult to injury, even with small derivs, small x 1e-8 makes\r\nfor a very anisotropic footprint, so it tended to take the maximum\r\nnumber of sample probes, yielding very pad performance.  Furthermore, in\r\nmany scenes you can see a \"seam\" between where things were humming along\r\nreasonably with normal F, and where F dips below the threshold and thus\r\nswitches to a radically different MIPmap level.  In any case, we had\r\nthought this case of very small F was rare, but turns out to pop up more\r\nfrequently than we thought.\r\n\r\nThis patch changes the strategy to make the minoraxis be the smaller of\r\nthe x and y derivative, clamped at a minimum of 1e-8, but not set\r\nunconditionally to 1e-8.  It definitely gets rid of the visual seam I'd\r\nbeen tracking, and I'm pretty sure will help with the performance cases\r\nthat others have seen.","assignee":null,"id":2277389,"number":195,"pull_request":{"patch_url":"https://github.com/OpenImageIO/oiio/pull/195.patch","html_url":"https://github.com/OpenImageIO/oiio/pull/195","diff_url":"https://github.com/OpenImageIO/oiio/pull/195.diff"},"labels":[],"title":"Review: Fix aniso footprint estimation for very-small-deriv case.","closed_at":null,"html_url":"https://github.com/OpenImageIO/oiio/issues/195","milestone":null,"url":"https://api.github.com/repos/OpenImageIO/oiio/issues/195"},"action":"created","comment":{"created_at":"2011-11-18T18:59:47Z","updated_at":"2011-11-18T18:59:47Z","user":{"gravatar_id":"d2fcc85d3e047515d096acf3664c620a","id":578593,"url":"https://api.github.com/users/fpsunflower","login":"fpsunflower","avatar_url":"https://secure.gravatar.com/avatar/d2fcc85d3e047515d096acf3664c620a?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"I'd rather get it right the first time to avoid confusion. What happens if you just comment out the test on F ?","id":2792832,"url":"https://api.github.com/repos/OpenImageIO/oiio/issues/comments/2792832"}}