Home Products Download Order Contacts

comp.graphics.algorithms

Subject: Re: Anti aliasing



yogesh.kini@gmail.com wrote:
>
> I tried using OpenGL GL_POLYGON_SMOOTH, but it doesnt seem to
> antialias
> a texture mapped quad. I used the following combination to render the
> quad.
>
> glDisable(GL_DEPTH_TEST);
>
> glBlendFunc(GL_SRC_ALPHA_SATURATE,GL_ONE);
> glEnable(GL_BLEND);
>
> glEnable(GL_POLYGON_SMOOTH);
> glHint(GL_POLYGON_SMOOTH_HINT,GL_NICEST);
>

You also have to depth-sort all your polygons
to make it work, and it doesn't work if you
have any blended polygon.

> Is there any other method to anti-alias polygons? preferably using
> pixel shaders.
> I would appreciate any links or ideas in this direction.
>

Pixel shaders won't help.

> Quality is the main criteria for my application.
>

Antialiasing is basically the process of rendering
at higher resolution than you need then down-sampling
the resulting image. Multisampling and accumulation
buffer basically do this for you.

If what OpenGL provides isn't good enough then you'll
have to do some of it yourself.

You can render images at any size in OpenGL by
rendering the images as a set of tiles. The
down-sampling is easy to do in software.

eg. Render at four times resolution giving 16
samples per pixel then calculate the average
of those 16 pixels for the final color.


--
<\___/>
/ O O
\_____/ FTB. For email, remove my socks.

In science it often happens that scientists say, 'You know
that's a really good argument; my position is mistaken,'
and then they actually change their minds and you never
hear that old view from them again. They really do it.
It doesn't happen as often as it should, because scientists
are human and change is sometimes painful. But it happens
every day. I cannot recall the last time something like
that happened in politics or religion.

- Carl Sagan, 1987 CSICOP keynote address


Reply


View All Messages in comp.graphics.algorithms

path:
Anti aliasing =>

Replies:

Copyright 2006 WatermarkFactory.com. All Rights Reserved.