   Image Filters with a pixel shader?
  hi, I''ve been looking at applying realtime image filter effects on my rendered scene. So far, i am rendering the whole scene to an off screen texture and then rendering it over the backbuffer using a single quad and a pixel shader. It all works nicely so far (i have it inverting the colors currently).Now, I want to make it more robust. Having come accross this article:http://www.gamedev.net/reference/articles/article1068.aspI was wondering whether its possible to implement a 3x3 convolution kernel on dx8.1 level hardware (in one or more passes)? I treid implementing it by passing in each surrounding texel as separate UV coords, but ran into the fact that i can''t sample more than 4 texture coords on that level hw .I''ve seen these effects running on my geforce4 (there was a recent motor bike racing game that had funky post effects in its replays), and was wondering how they are implemented? Are they hardcoded or would they use the techniique described above?Thanks.   - Thomas 
  try looking for the old NVeffects browser, it has code for different image processing filters which runs on older hardware.for newer things check out this article:http://www.ati.com/developer/gdc/GDC2003_VideoShader.pdf ;  On 8.1 hardware, you should be able to do ps_1_4, which can do 6 samples per pass, times two passes. 8.0 hardware, such as GeForce3/4, can only do 4 samples.However, you can accumulate into another offscreen surface and multi-pass to get more samples. Also, you can use bilinear filtering to sample 4 texels at the same time with a weighting between them that you determine.Last, if your kernel is separable, you can do one pass for horizontal and one pass for vertical. ;  If you are using opengl, you can try EXT_convolutionhttp://oss.sgi.com/projects/ogl-sample/registry/EXT/convolution.txt 