]> git.sesse.net Git - movit/commit
In ResampleEffect, optimize the bilinear weights on a global scale.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 22 Feb 2015 23:20:49 +0000 (00:20 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 22 Feb 2015 23:25:07 +0000 (00:25 +0100)
commit833bbfaf5387f213e6a9c355b93aa622c74ec88f
tree3bc20abf2ac6c84d41b45c1ce87a29570ac052f0
parentc62391987241f1482a99b6f6417fbec1d0ef2344
In ResampleEffect, optimize the bilinear weights on a global scale.

In addition to the individual weight optimization we do when combining samples,
this technique optimizes the weights as a whole, through some linear algebra.
This means it can take into account effects such as multiple bilinear samples
influencing the same coefficient (which normally should not happen, but might
nevertheless due to imprecisions in the stored texture coordinates), or
non-combined sample positions that can't hit the exact middle of the texel.

In practical tests, this is extremely effective; it often reduces the computed
sum of squared coefficient errors by as much as a factor 1000, although I
haven't verified how often it actually saves us from having to do fp32 fallback
with the rather tight error bounds that are in place.
resample_effect.cpp