Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

copacetickid

anti-aliasing artifacts (polygon outlining)

This topic is 5280 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

artifact I am rendering a cluster of blocks (touching, or close together) and i''m trying to achive the effect of simple flat shaded sides with nice smoothed black outlines. I go about this by first rendering the blocks in polygon fill mode with blending disabled, and with a polygon offset. Then i do a second pass and enable blending, a blend func of (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA), depth test as GL_LEQUAL, the depth mask off, and finally GL_LINE_SMOOTH enabled. I get decent results, with a very odd exception: if an edge of a block in the forground obscures a block behind it, the line rendered on the edge of the foremost block is horribly aliased. However, it is only aliased on the side that should be blended with the block in the background; it is fine on the inside of the block, and also fine when a block''s edge is on the background color. What is causing this? I know the color of the block in the background is in the framebuffer before i render the line, so why isn''t it using it to blend with?

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!