Message Board
Message Board > Fenix / Bennu / Gemix / DIV > Filtering |
May 23, 2008, 11:41 | |
yonni
None 420 posts |
In Flamebird in the compilation preferences I get the option to "Enable Filtering". Because my new game was dropping frames left and right (probably a coding error on my part), I decided to see what effect unchecking that had. Well, framerate has certainly improved, which is good, and I can't notice any difference to the appearence or how it works. So what exactly does this "filtering" do? Is it wise to turn it off? ____________ |
# |
May 23, 2008, 14:03 | |
Sandman
F3n!x0r 1194 posts |
I don't know of any compilation filter, but there is a flag for the interpreter, which tells Fenix (FXI) to use a filter, which only is used in 16bit mode: C code: Uint16 * ptr, * orig ; orig = scrbitmap->data ; ptr = screen->pixels ; if (enable_filtering) { int n; for (a = 0 ; a < screen->h ; a++) { ptr = (Uint16 *)screen->pixels + screen->pitch * a / 2 ; for (n = 0 ; n < screen->w-1 ; n++) { *ptr = colorghost[orig[0]] + colorghost[orig[1]] ; ptr++, orig++ ; } *ptr++ = *orig++ ; } } else { for (a = 0 ; a < screen->h ; a++) { memcpy (ptr, orig, screen->w * 2) ; orig += scrbitmap->pitch / 2 ; ptr += screen->pitch / 2 ; } } This is more intensive than the normal mode obviously. As to what it does, it seems to be a sort of blur, as it takes two pixels into account when making a pixel: the pixel itself and its right neighbour. So you decide if you want it or not. ____________ BennuWiki Yes, my avatar has grey borders in IE (so get a decent browser) ROOFLEZ ROOFLEZ |
# |
May 23, 2008, 14:53 | |
yonni
None 420 posts |
Even on close inspection looking for a blur I can only see a difference where the framerate is concerned
____________ |
# |
May 24, 2008, 03:18 | |
Dennis
どこかにいる 2092 posts |
bweh... Sandman, you program very low. I bet you love assembler. Isn't there a quicker way to do this?
____________ Kwakkel |
# |
May 24, 2008, 11:39 | |
Sandman
F3n!x0r 1194 posts |
Yes I like Assembler, but I mostly code in C++ nowadays. A quicker way to do what? I can't spot a difference as well, yonni, I won't use it if I were you if it slices your framerate. ____________ BennuWiki Yes, my avatar has grey borders in IE (so get a decent browser) ROOFLEZ ROOFLEZ |
# |
Message Board > Fenix / Bennu / Gemix / DIV > Filtering