I'm trying to optimize the BlueFilter a bit. My idea is to make a filter which uses resolution of 1 for only few first N passes, then lowers its resolution by 25% for another N passes and then lowers resolution again for another N passes and so on.
I want the resolution and blur to change like this:
|---------------|---------------|---------------|
blur: 0 1 2 3 4 5 6 7 8 9 10 11 12
res: 1 .75 .5 .25
realBlur: 0 1 2 3 3 3.75 4.5 5.25 4 4.5 5 5.5 3
This approach requires a lot less passes to draw a very blurry object.
Of course, I don't want to create a new texture every time I lower the resolution, but I'd like to use only a part of the existing texture. Unfortunately I have no clue how to do that or if that's even possible.
Daniel, could you please tell me what should I change to implement such a "dynamic resolution"?