anti alias
BlitzMax Forums/BlitzMax Programming/anti alias
| ||
hi! ive just switched my graphics program over to illustrator, and wondered if there's any way of moving an image in floats? so it's smooth? whenever I try and just say: posiX :+ 0.5, or anything like that, Bmax just seems to round it up to an int. Or not move at all. help! una.x |
| ||
Activate the alphablending. SetBlend(ALPHABLEND) |
| ||
doesnt seem to work :( ive got one sprite's speed set at 0.5 per cycle, and its just not moving. any ideas? thanks ziggy. una.x |
| ||
are you using whole numbers to store the xy positions? if you are it rounding 0.5 to 0. x = float(x)+0.5 or x:float:+0.5 |
| ||
i think what i mean is: how do I get float co-ords without them getting rounded to ints? x |
| ||
Make sure your initial coords are defined as floats (as per Pantson's post) |
| ||
Also make sure the images are loaded with the FILTEREDIMAGE flag (they should be by default unless you are doing something different) |
| ||
thanks guy! seems i had to implicitly pass arguments as floats. I was jus being silly :S sorryyyy. x |
| ||
It will move it by 0.5 every interval, but as for 'smooth movement' that you are looking for, you shouldn't notice any difference except for slower movement. I'm pretty sure it won't render a different position until it reachers the next integer (pixel). It basically means that you'll see movement every 2 position updates instead of 1. I have no clue what plasma or HD really does with bitdepth or how it works at all, but maybe smooth float movement could be accomplished with HD in 3d? |
| ||
When rendering a sub-pixel positions the graphics card will anti-alias the who image (and edges) so that it sorta looks like it's at a 0.5 position. It's surprisingly effective if you say move something from 0 to 1 via 10 sub-pixel positions for example. |
| ||
Ahh, good to know. I didn't think it was possible, but I wasn't aware that anti-alias blended the pixels according to that. Crazy stuff. |
| ||
I have an antialias modification in the mods forum. |