Sign in to follow this  
Rudibs

OpenGL Antialiasing without multisampling?

Recommended Posts

Is this even possible?

Unless, i would be able to remove the aliasing by some other way.
I know OpenGL had some option to enable antialiasing with GL_POLYGON_SMOOTH back in the days,
i seems that nowadays most graphic-cards could only do Antialiasing with the multisample option.
And in my case the graphic card dont support multisample, so what other way could one do to remove
aliasing artifacts and also [u]without[/u] the use of shaders?

I've attached an image of some cubes joined together, they seem to give some aliasing, that is the edges of the
polygons aint placed evenly together when they render. Is there a way to fix this?

[edit: im looking into the depth bias]

Share this post


Link to post
Share on other sites
Without the use of any shaders this could get quite tricky
What kind of card are you using exactly if it doesn't support multisampling?

There are some very decent alternatives to MSAA which use edge detection algorithms (like MLAA), but I don't see a way to implement those without the use of shaders

Share this post


Link to post
Share on other sites
[quote name='Radikalizm' timestamp='1311085860' post='4837399']
Without the use of any shaders this could get quite tricky
What kind of card are you using exactly if it doesn't support multisampling?

There are some very decent alternatives to MSAA which use edge detection algorithms (like MLAA), but I don't see a way to implement those without the use of shaders
[/quote]

Actually its a strange hybrid of Intel® GMA X4500hd, i think.
some gl-extensions i can find here: [url="http://www.gamedev.net/index.php?app=core&module=attach&section=attach&attach_id=4224"]cantiga[/url]
and its gpu integrated in laptop: mobile esprimo v6535

this card doesnt support very much use of shaders. only ehm 1.10 i know of that is 100% supported.
shader-versions over that is more or less not-supported.

(edit: i dont have much experience in coding shaders, so it would be a bit daunting task to do anyway).

Share this post


Link to post
Share on other sites
You can do supersampling by rendering to a target that is 2x or 4x in resolution and then using standard texture sampling as a means to smooth detail when downsampling.

Share this post


Link to post
Share on other sites
[quote name='arbitus' timestamp='1311089592' post='4837438']
You can do supersampling by rendering to a target that is 2x or 4x in resolution and then using standard texture sampling as a means to smooth detail when downsampling.
[/quote]

Seeing as he is using a rather weak integrated card this could get rather expensive even for low resolutions

Share this post


Link to post
Share on other sites
[quote name='arbitus' timestamp='1311089592' post='4837438']
You can do supersampling by rendering to a target that is 2x or 4x in resolution and then using standard texture sampling as a means to smooth detail when downsampling.
[/quote]

hmm, yea, good idea. ill try that out.

by the way what i've discovered, which i didnt mention before was that
it just doesnt seem right that there would be white jaggies on the parts that are dark on that image.
i could try out changing the depth bias for each cube though. maybe that would work.
so my next question is this: would it be possible to retrieve the z-buffer value from each fragment and make the change per fragment in the z-bias
to remove those artifacts?
actually, when i come to think about it, i have a hunch that antialiasing the cubes or the whole back/front-buffer with that image would probably not
reduce the white stripes entirely, but i might be wrong. it's one thing i would try to figure out in a while.

thanks for the replies.

Share this post


Link to post
Share on other sites
[quote name='Radikalizm' timestamp='1311090297' post='4837448']
Seeing as he is using a rather weak integrated card this could get rather expensive even for low resolutions
[/quote]

Do you mean that the GetFrontBufferData (or BackBuffer for that matter) is too expensive for that, per frame?
I havent really tested it, but you might be right. it probably would not work. Since i want this in a reasonable framerate.

Share this post


Link to post
Share on other sites
[quote name='Rudibs' timestamp='1311090924' post='4837456']
[quote name='Radikalizm' timestamp='1311090297' post='4837448']
Seeing as he is using a rather weak integrated card this could get rather expensive even for low resolutions
[/quote]

Do you mean that the GetFrontBufferData (or BackBuffer for that matter) is too expensive for that, per frame?
I havent really tested it, but you might be right. it probably would not work. Since i want this in a reasonable framerate.
[/quote]

It mostly depends on how populated your scene will be, try to find out how many ms it takes to render 1 frame right now to get an estimate of how much time it will take to render to higher resolutions
If your scene will be simple without too many independent entities (ie. without too many draw calls, polygons, 'complicated' shading, etc.) you should be fine

I'd just try the suggested method and see how it works out :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this