PDA

View Full Version : Hardware Convolution



MiDeM
11-16-2004, 10:43 PM
Hi,

I would like to convolve my FB. What is the most optimized technique to do it ?

Thx.

:p

marco_dup1
11-17-2004, 03:09 AM
Originally posted by MiDeM:
Hi,

I would like to convolve my FB. What is the most optimized technique to do it ?

Thx.

:p You can use the imaging extension but this is limited. For this extension you need only a glCopyPixels call. You could render to a texture and implement a fragment shader to do the convolution. Than you draw a fullscreen quad.

RAMman
11-17-2004, 03:44 AM
What kind of filter kernel do you have in mind?

An seperable kernel, like the gauss kernel, would be faster than a kernel that cannot be seperated. With the seperated kernel you can do two full screen rendering passes, and use a fragment program for each 1D kernel.

If the kernel is non seperable you might get some problems with som older SM 2.0 cards relavtively low instruction capabilities (96 instructions).