[Download]
Code for separable gauss blur, generating weights and sample offsets suitable for bilinear lookups. In addition the code keeps to your NUM_WEIGHTS (number of tex2D lookups) by calculating how many times you need to scale-down-by-two first (using StretchRect which is fast).
So you get a nearly artifact free (depending on source image) gaussian blur for a fixed cost of 13 bilinear texture samples and arbitrary blur size.
http://aavdev.blogspot.com
So you get a nearly artifact free (depending on source image) gaussian blur for a fixed cost of 13 bilinear texture samples and arbitrary blur size.
http://aavdev.blogspot.com