anti alias

BlitzMax Forums/BlitzMax Programming/anti alias

unazebra(Posted 2008) [#1]
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


ziggy(Posted 2008) [#2]
Activate the alphablending.
SetBlend(ALPHABLEND)


unazebra(Posted 2008) [#3]
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


PantsOn(Posted 2008) [#4]
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



unazebra(Posted 2008) [#5]
i think what i mean is: how do I get float co-ords without them getting rounded to ints?
x


tonyg(Posted 2008) [#6]
Make sure your initial coords are defined as floats (as per Pantson's post)


Grey Alien(Posted 2008) [#7]
Also make sure the images are loaded with the FILTEREDIMAGE flag (they should be by default unless you are doing something different)


unazebra(Posted 2008) [#8]
thanks guy!
seems i had to implicitly pass arguments as floats.
I was jus being silly :S
sorryyyy.
x


Retimer(Posted 2008) [#9]
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?


Grey Alien(Posted 2008) [#10]
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.


Retimer(Posted 2008) [#11]
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.


JoshK(Posted 2008) [#12]
I have an antialias modification in the mods forum.