what are the steps to perform downsampling on a texture ? I've got as far as rendering the scene to a render target, but I'm not sure as to how to then render that to a smaller texture in order to blur it. I can't seem to find in good explanation or tutorial about this technique.
Take the 2-minute tour
×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.
Render a large quad (with your texture) to a smaller render target, performing whatever blur/downsampling algorithm is appropriate. I.e. for each target pixel, sample the number of texels from the source you'd want to combine. The simplest (and thus fastest, but ugliest) is the box filter, which usually uses 4 samples from the large texture and put their average into a single texel/pixel in the target. Repeat this step until destination is 2x2 to get all mip-map levels for a texture. There are two-pass techniques that are more efficient if you don't need the intermediate textures, and just a result, see this gamasutra article. |
|||||||||||||||||||||
|