|
|
| Transformation vs. stretched buffer - image quality |
|
Frank Drebin
Member #2,987
December 2002
|
When I found this article |
|
Audric
Member #907
January 2001
|
As the article says, transformation is best if your game mostly uses primitives (lines, rectangles...) Stretched buffer doesn't have this issue because integers match exactly the coordinates and sizes of elements in the original referential, so the computations are pixel-perfect. 3D rendering systems don't have this issue because the system will keep track of all coordinates with decimal precision, and takes the entire scene into account when rasterizing. |
|
Edgar Reynaldo
Major Reynaldo
May 2007
|
You might want to try adding al_set_new_bitmap_flags(ALLEGRO_MIN_LINEAR | ALLEGRO_MAG_LINEAR) for scaling your sprite. It will make it look immensely better imho. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
|
Frank Drebin
Member #2,987
December 2002
|
Edgar, I tried adding these flags, however, the image looks more blurry then but not as nice as with the transformation (see attachement #2). Maybe there is a hidden filter applied when transformations are used? Audric, I did not know that. In fact I found for example this thread where it sounds like people actually prefer transformations over a stretched buffer because it is less GPU/memory intense because the GPU will do scaling anyway. But if you say that this could yield in a 1-pixel inaccuracy this would be a big disadvantage (at least for me) |
|
Edgar Reynaldo
Major Reynaldo
May 2007
|
If you like the pixelated look that's fine just don't use Allegro mag linear My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
|
Frank Drebin
Member #2,987
December 2002
|
OK guys thanks for your help. I found that pixel inaccuracy may occur indeed (see attachment #3) when using transformation (especially non-integer scaling) so I think I'm gonna stick with the stretched buffer... |
|
Edgar Reynaldo
Major Reynaldo
May 2007
|
Transformations only affect the underlying data. If your vertices are off, there's nothing you can do. There should not be a conflict between using transformations and drawing textures. How do you think all those 3D games are super seam less and all that? There's something else going on. EDIT My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
|
Frank Drebin
Member #2,987
December 2002
|
OK this makes sense indeed... I'll try to figure out where that 'inaccuracy' may come from... |
|
|