From 4d69b79ca72a805c57242db576ece5d0835ef5ec Mon Sep 17 00:00:00 2001 From: gmiranda Date: Fri, 28 Jul 2006 12:46:49 +0000 Subject: [PATCH] I implemented a new blur algorithm. Works better, but there's something in the second pass that introduces more dots. git-svn-id: https://svn.code.sf.net/p/q3cellshading/code/trunk@26 db09e94b-7117-0410-a7e6-85ae5ff6e0e9 --- code/renderer/tr_image.c | 201 +++++++++++++++++++-------------------- 1 file changed, 100 insertions(+), 101 deletions(-) diff --git a/code/renderer/tr_image.c b/code/renderer/tr_image.c index bdd1ddb..fad6036 100644 --- a/code/renderer/tr_image.c +++ b/code/renderer/tr_image.c @@ -839,110 +839,109 @@ for(row=rows-1; row>=arow+3; row--) #define DIVNUM 15 + +/** + * 2 passes blur filter + * @see http://www.filtermeister.com/tutorials/blur02.html + */ + void blur(int columns, int rows, byte *targa_rgba) { - int row, column; - float red,green,blue; - float ared,agreen,ablue; - - ared=agreen=ablue=128; - - //for(row=rows-1; row>=0; row--) - for(row=0; row