I'm watching Tiago's talk from siggraph 2013 about dof implementation in CryEngine 3 (very similar to dof implementation used later in idtech 6 as far as I know).
Around 2:17:33, Tiago said that they were using Bilateral filter for downsampling to avoid bilinear filtering errors. He was basically saying "rejecting taps based on similarity".
I was wondering if someone knows how to implement this downsampler.
Let's say we're downsampling to quarter resolution, I can sample 4 taps and average only those who are "similar" (intensity level difference don't cross a threshold) - this raises 2 questions though:
1. Which tap should be the reference tap for rejection? picking any of them just seems random and picking the average might give an empty result in case the taps are completely different (the unfortunate case of a sharp aliased edge).
2. Sampling 4 taps and doing all these operations just to downscale seems like a lot of instructions that will kill perf. This makes me believe that I’m doing it wrong.
Would be great to hear how to do it properly and also a short explanation why bilinear is bad for this case.
Thanks!