[OpenJDK 2D-Dev] How does antialiasing with the OpenGL pipeline work?

Clemens Eisserer linuxhippy at gmail.com
Mon Oct 1 20:22:22 UTC 2007


Hi again,

The reason why I asked is because the idea of a rasterizer is in my
head which is written in GLSL. Because the whole rasterization-process
is pixel-for-pixel (or in the case of AA, a pixel many times) a
fragment shader seems somehow cool.

Of course I know that the shader would run extremly slow (compared to
other shader-scripts usually used in 3d games), and that maybe even
fragment-shader-3.0 is needed for all the conditions - but maybe a
pre-digested format could be sent to the GPU which minimizes the
amount of corner-cases and complex logic stuff.
A great benefit of such a shader would be batch-abilitiy, so if e.g.
many lines are drawn with solid colors, all could be done in one
shader-run. So only one upload would be needed for many small
operation.

Even if it would never reach production quality or high performance,
it somehow fascinates me ;)

lg Clemens

2007/10/1, Jim Graham <Jim.A.Graham at sun.com>:
> One thing the bug report doesn't seem to mention is that the tiles are
> 32x32 (it implies it by talking about the 1024 values being copied), and
> that there is a function which quickly tells you whether a tile is all
> 0s or all 1s so the renderer can either skip or do quicker fills of
> regions that are all inside or all outside the path.
>
> The sun.java2d.pipe.AATileGenerator interface currently in the public
> sources defines the methods in that workflow and shows a sample of how
> they work.  You can see it being used in a real world setting in the
> AAShapePipe class in the same package...
>
>                         ...jim
>
> Clemens Eisserer wrote:
> > Hi Roman,
> >
> >> Hey come on! I'd like to know the answer too. Give us a pointer to this
> >> bug report! ;-)
> > Of course not ... here it is:
> > http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6529101 ;)
> >
> > Although I don't understand / it does not mention all the details it
> > seems they let produce those alpha-masks by doctus and indeed upload
> > those alpha-masks to vram which seems to cause performance-problems
> > for simple operations covering large areas.
> > What I still don't know is how these alpha-masks look in detail and
> > wether the "normal" rendering is done? I guess the mask is used as
> > mask and then "painted" with color ;)
> >
> > Btw. I read in your blog that you've done a rasterizer - whats the
> > state of it, or the renderer implemented by Jim? I am just looking for
> > a simple one to lern/"reserach" a bit in this topic.
> >
> > Thanks, lg Clemens
>



More information about the 2d-dev mailing list