• Advertisement
Sign in to follow this  

Anti Aliasing creates diagonals/triangles

This topic is 1552 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

Hello,

 

 

I made a Java 2D Game, written with the Slick2D + LWJGL Library.

On my Laptop, its perfectly working with Anti Aliasing on an Intel I7 and a HD 4000 Graphic Card

 

But, when i transfered it one to one to my PC, the Anti Aliasing creates Triangles/Diagonals.

If I turn it off, it works without Problems. (But I need AA)

 

PC Specs:

Graphics Gard: GTX 680 EVGA

CPU: FX 8350

 

Picture with AA:
OyPRYum.png

 

Without:

3VKt6fi.png

 

Any Help would be appreciated ;)

 

Regards,

Johnny

Share this post


Link to post
Share on other sites
Advertisement

I dont draw these Triangles on purpose, they are Rectangles.

 

I use "org.newdawn.slick.geom.Rectangle" for it.

If I would draw a Circle, you would see Triangles in the Circle.(Basically ever geom is made out of Triangles, and if i turn AA on, you can see them)

Share this post


Link to post
Share on other sites

Can you see this issue on other apps/games when rendering with the GTX 680?

 

If not, I would guess that this is a bug in the Slick library.

Share this post


Link to post
Share on other sites

This is not a bug in the Slick library, this is how line/triangle anti-aliasing works in OpenGL.  A rectangle is made of two triangles that share an edge, and along that shared edge each triangle will be writing some of the pixels at partially alpha'd out values.  Where these two triangles overlap will cause issues.

 

In general if you want antialiasing, you'll want to use MSAA, SSAA, or some sort of post processing trick like FXAA.   For line art, sometimes the hardware edge AA can be used, but you need to understand where and why it wouldn't be acceptable.  Even then, I'm not sure all game grade GPU hardware even supports edge AA (I know NVIDIA gpus do, but not sure about AMD).

 

Short answer: you're using the wrong type of AA.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement