Best way to implement antialiasing
Here is my situation:
I am using Radeon 9800 Pro cards under linux.
- I have a scene where I have some lines and flat
texture polygons of various shapes.
- Some textures are partly 100% transparent (loaded as from .png)
and I want the edges of these antialiased. They are painted onto
rectangular squares so the polygon edges doesn't resemble the
edges I want antialiased.
- Pretty much nothing is moving.
Which is the best way for me to implement AA?
Err.. FSAAx4? Or you could anti-alias the texture itself using 33% and 67% transparancy.
Unfortunately, Radeon cards don't support supersample antialiasing. Instead they use multisampling, which, while it is accessible through OpenGL, only antialiases the edges of polygons.
Your best bet is to use blending and trilinear filtering to render the transparent polygons. Remember to sort them by depth (possibly with a radix sort) and render them after everything else.
I'm not sure how that achieves antialiasing. That's just changing the opacity of the texture.
Your best bet is to use blending and trilinear filtering to render the transparent polygons. Remember to sort them by depth (possibly with a radix sort) and render them after everything else.
Quote:Or you could anti-alias the texture itself using 33% and 67% transparancy.
I'm not sure how that achieves antialiasing. That's just changing the opacity of the texture.
Ok, I guess I'll make the textures opaque then and code the polygons into my program. Seems like less trouble, or what do you think?
Which extension am I suppossed to use to and where can I download it? (Radeon9800Pro under linux)
Best Regards, Johan Torp
Which extension am I suppossed to use to and where can I download it? (Radeon9800Pro under linux)
Best Regards, Johan Torp
Quote:Original post by benjamin bunnyQuote:Or you could anti-alias the texture itself using 33% and 67% transparancy.
I'm not sure how that achieves antialiasing. That's just changing the opacity of the texture.
I suppose he means doing it around the edges. I.e. instead of just having 0% and 100% transparency, you could also have other transparencies at edges.
So if you have the following (1 being opaque and 0 being transparent.)
00000011111111110000
You could do like this instead (x being, say, 60% transparent):
00000x1111111111x000
This will of course only work if you use blending instead of alpha testing.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement